Kitt-AI / snowboy

Future versions with model training module will be maintained through a forked version here: https://github.com/seasalt-ai/snowboy
Other
3.11k stars 1k forks source link

Adjust for background noise? #50

Closed aazimh closed 8 years ago

aazimh commented 8 years ago

Hi guys,

Love Snowboy, been using it for a while now for a voice-activated dashboard of sorts on my RPi at home. The problem I have though is that I seem to be getting a lot of false triggers whenever I turn the TV on. I've moved the mic further away from the TV, I'm using a personal model that was recorded using the RPi as well, so I think the obvious fronts are covered.

My question was, is there a way to adjust for background noise when instantiating a HotWordDetector? I feel like I had seen some code with a method like that months ago when initially looking into Snowboy, but I can't find anything like it now.

I'd appreciate letting me know if there is any such function, and if not, any other tips you guys might have to reduce false positives when there's some background noise (sleep time values, model adjustments, etc.).

Thanks a lot!

chenguoguo commented 8 years ago

Hey,

Thanks for the feedbacks. It's generally hard to optimize for different conditions, including the microphones, the environments, etc. There are things we could do on the model level, but that will be in future releases.

You could try to reduce the sensitivity value, if 0.5 is too high for you. That will likely reduce the detection rate though. You could also try to use longer hotwords, long hotwords are usually less likely to false alarm. Another trick was pointed by another user, where he used two different hotwords, and he only fires up the callbacks when both are detected in sequence. Hope those helps.

aazimh commented 8 years ago

Fair enough, thanks for the suggestions! Will definitely take a look at trying some. Does that mean I was imagining the function that adjusts for background noise automatically? :)

chenguoguo commented 8 years ago

You were probably talking about the audio-gain parameter :-) That may not relate to the background noise directly, but you can play with it. Search for audio_gain in this file: https://github.com/Kitt-AI/snowboy/blob/master/examples/Python/snowboydecoder.py

Closing this since question has been answered.