Open kenanEkici opened 6 years ago
The best structure should look like this:
You will have to write your own code though.
People have tried to save the audio to a file after the detection, see https://github.com/Kitt-AI/snowboy/blob/master/examples/Python/demo4.py
People have also tried to stop the recording session after the hotword is detected, see here https://github.com/Kitt-AI/snowboy/issues/12
I am currently working to combine Google Assistant and Snowboy. However, I am using multithreading in order to make this work. The only issue I have encountered so far is that the detector.start() seems to be a never ending thread. Because Google Assistant relies on the detector thread to end, this becomes an issue. I currently solved this by placing a "break" in the while loop in snowboydecoder.py the moment the given callback function is called. I believe Snowboy was meant to run on the main thread initially? The underlying code of the demo seems to fail when shifting away to multithreading.