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

Allow users to import a custom wake word model #291

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

celskeggs
Copy link
Contributor

@celskeggs celskeggs commented Feb 21, 2025

While I can recompile Dicio myself to replace the wake word... it would be really nice if users could use a custom wake word more easily. This PR adds the ability to import a .tflite file to override the default downloaded "Hey Dicio" wake word.

Generating a custom wake word is out of scope for the app, but users can download a model from the Home Assistant collection or use the OpenWakeWord scripts for training on Google Colab.

Fixes #289 #275 #238

It is still necessary for users to generate the wake word model on
their own, but now it is not necessary to recompile the app to use it.
This allows the UI layer to listen to changes
@Stypox
Copy link
Owner

Stypox commented Feb 27, 2025

I pushed a few commits which:

  • fix some synchronization issues in the OpenWakeWord model
  • avoid having the view model access the specific wake word device instance (which may be recreated at any time)
  • make the methods to handle the custom model file static, so they can be used independently of the current wake word device
  • make it so that the text in the notification changes from Listening for the "Hey Dicio" wake word to Listening for custom wake word automatically
  • improve the strings a bit and add some suggestions on where to download the models

Other than that, thank you for this PR! The general approach was good, but I had to make some of the above changes to make the code modules more well separated and generalized.

Debug APK: https://github.com/Stypox/testing-apks/releases/download/13/app-debug.apk (can be tested with models downloaded from https://github.com/dscripka/openWakeWord/releases/ )

- avoid having the view model access the specific wake word device instance (which may be recreated at any time)
- make the methods to handle the custom model file static, so they can be used independently of the current wake word device
make it so that the text in the notification changes from `Listening for the "Hey Dicio" wake word` to `Listening for custom wake word` automatically
@Ram-Z Ram-Z mentioned this pull request Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple built-in wake words and/or import custom wake word
2 participants