Sound fingerprint/recognition

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
Gen
Posts: 23
Joined: 09 Mar 2019 10:02

Sound fingerprint/recognition

Post by Gen » 21 Nov 2019 16:07

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.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Sound fingerprint/recognition

Post by Desmanto » 23 Nov 2019 06:39

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Gen
Posts: 23
Joined: 09 Mar 2019 10:02

Re: Sound fingerprint/recognition

Post by Gen » 23 Nov 2019 22:05

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.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Sound fingerprint/recognition

Post by Desmanto » 24 Nov 2019 07:53

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Gen
Posts: 23
Joined: 09 Mar 2019 10:02

Re: Sound fingerprint/recognition

Post by Gen » 24 Nov 2019 08:55

Ohh, cool!

I thought it was only a tasker plugin.

Alright I'll give it a go, thanks!

Locked