Page 1 of 1

Sound fingerprint/recognition

Posted: 21 Nov 2019 16:07
by Gen
Hi,

As far as I'm aware this isn't currently possible but correct me if I'm wrong.

It would be useful to have a way to store a fingerprint/sample of a sound (non-speech) in a variable to be used later to compare to a second sound input.

My use case is that I'm trying to create a "smart" smoke detector out of a regular smoke detector that would alert me when the alarm goes off.

My idea is to create a sound level trigger that would trigger once the sound level threshold is reached (by the activation of the alarm) and take a sound sample of a few seconds then compare this sample to the sample saved earlier and if it matches say 90%, activate the rest of the flow (e.g. dial a number).

This would prevent false positives compared to using sound level trigger only.

This is kind of a shazam-type functionality.

Re: Sound fingerprint/recognition

Posted: 23 Nov 2019 06:39
by Desmanto
Unfortunately input speech can't work in this situation. You might want to try HotWord Detection : https://forum.xda-developers.com/u/task ... e-t3692422
I requested it here : viewtopic.php?t=7197
But I retracted, because it will be a tremendous work for Martin to reinvent the wheel. It is better for us to just use the app. The dev, Humpie, also very open to new development.

I don't know if you can create a custom voice using the smoke detector alarm sound, but maybe it might worth a try.

Re: Sound fingerprint/recognition

Posted: 23 Nov 2019 22:05
by Gen
Thanks for the suggestion.

I've had tasker for a while and tried using it to compare it to automagic but gave up after a while.

The interface is horrible and I couldn't find anything that it could do which automagic couldn't.

So I'm not very familiar with how to use it.

Have you used Hotwords before? If you have it, are you able to confirm if you can can add a custom "non-word" sound for it to detect?

If I know it can achieve my goal I might give it another go.

Thanks!
Gen.

Re: Sound fingerprint/recognition

Posted: 24 Nov 2019 07:53
by Desmanto
Uhm, Hotword plugin also works with Automagic. You only have to download the Hotword app only, not tasker.
But I agree though that I can't get back to tasker anymore.

I have tested before using the universal voice available at the github, such as alexa, computer, jarvis, hey google. You can login using your google account to the snowboy site and create your own. I just tried to create a double clap sound and record the double clap 3 times, put it into Automagic. And yes, double clap can trigger the flow, just like usual word command.

But your mileage may vary. You must ensure the sound you record is very unique on its own. As it use AI to train the hotword, you might get a better result by rerecording it many many times. Try to adjust the background sensitivity or the sound gain to get it right.

Re: Sound fingerprint/recognition

Posted: 24 Nov 2019 08:55
by Gen
Ohh, cool!

I thought it was only a tasker plugin.

Alright I'll give it a go, thanks!