Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detector thread #411

Open
kenanEkici opened this issue Mar 29, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@kenanEkici
Copy link

commented Mar 29, 2018

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.

@chenguoguo

This comment has been minimized.

Copy link
Collaborator

commented Apr 6, 2018

The best structure should look like this:

  1. You have audio capture running in the main thread
  2. You send the the captured audio to Snowboy for hotword detection
  3. You route the captured audio to Google Assistant once the hotword is detected
  4. You route the audio back go Snowboy once you finish your work with Google Assistant

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 #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.