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.1k stars 1k forks source link

Does snowboy record sound #197

Closed dolanmiu closed 7 years ago

dolanmiu commented 7 years ago

long shot but,

Does snowboy record sound by any chance?

Is it possible to record a .wav file of what they have said after they said a hotword?

@bogdanabadi

xuchen commented 7 years ago

Yes Snowboy comes with VAD that gives you silence signal after talking stops, then you have save that buffer of audio to disk.

http://docs.kitt.ai/snowboy/#how-to-use-snowboy-s-vad-to-detect-voice-and-silence

Please use Issues to report bugs and use the forum to post questions.

dolanmiu commented 7 years ago

Could you give me some direction on where to find this buffer? Is it a property of the detector class?

chenguoguo commented 7 years ago

It requires some coding, but you can basically use this ringbuffer implementation (if you use Python): https://github.com/Kitt-AI/snowboy/blob/master/examples/Python/snowboydecoder.py#L21

The idea is that you start putting data to your buffer when your hotword is triggered, and stop doing so after silence is detected.

You can also take a look at Sonus, it's written in Javascript but it has all the functionality to send data to ASR server after hotword detection.

Mnark commented 7 years ago

I achieved the same thing in principal, by having snowboy detect the hotword, and that event triggers the microphone to start recording. The 'trick' is that the computer thinks it has two microphones, to do this you need to make sure you connect using pulseaudio (which connects to the actual microphone via ALSA)