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

Use upstream openWakeWord #27

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

Conversation

synesthesiam
Copy link
Contributor

@synesthesiam synesthesiam commented Jun 27, 2024

Switches to using the upstream openWakeWord Python library instead of a custom fork.

Some things not yet implemented:

  • Custom verifier models

@synesthesiam synesthesiam self-assigned this Jun 27, 2024
@synesthesiam synesthesiam force-pushed the synesthesiam-20240627-openwakeword branch from 30fc1f3 to 8fc9f41 Compare July 1, 2024 14:05
@qJake
Copy link

qJake commented Jul 6, 2024

I'm new to this repository, and I wanted to test this branch out because master was giving me issues.

I checked it out, installed the requirements, and it is running successfully... but I had to remove the --preload-model parameter. I use a custom wake word model that works in master (by specifying --custom-model-dir and --preload-model), but I couldn't get that to work on this branch.

I guessed that maybe OWW would be configured via Home Assistant then (since you can change the wake word there), but when I went to add it to the Wyoming Protocol like this:

image

But it fails:

image

I also tried "ok nabu" and "hey jarvis", figuring maybe it was hard-coded for testing... and nope. Didn't work either. 🙃

What am I missing here? I'd love to help test this branch!

@synesthesiam
Copy link
Contributor Author

Thanks for trying out the branch! Do you see any errors in the logs when the connection fails? I'll double check, but it was working for me.

I removed the preload model argument since it isn't needed with OWW proper.

@qJake
Copy link

qJake commented Jul 6, 2024

Thanks for trying out the branch! Do you see any errors in the logs when the connection fails? I'll double check, but it was working for me.

I didn't see anything, but let me try again with --debug and I'll report back.

For what it's worth, on the same device, the Satellite can connect just fine on :10700.

@Graimalkin
Copy link

If you restart OpenWakeWord with Satellites already connected to it, handle_event crashes because self.model is None.

You need to kill the satellites THEN restart OpenWakeWord, so that it doesn't get a AudioChunk type message before it can init the model. This is obnoxious when you're running multiple remote satellites that aren't on the same machine as the OpenWakeWord container. 😛

Screenshot shows satellites up and container restarting ( and erroring ). Then satellites off and OpenWakeWord container restarting successfully and allowing the client to connect.

You'll probably want to put some sort of self.model init function in for if you get an AudioChunk type message and self.model is None

image

@synesthesiam
Copy link
Contributor Author

Thanks @Graimalkin this is easy to fix 👍

@canberkoguz
Copy link

hi @synesthesiam, thanks for the great work!
as a developer, is there anything that I can help to get custom verifier model support?

@qJake
Copy link

qJake commented Jul 15, 2024

I was able to finally test this, and while it does show up in Home Assistant correctly, I'm getting this error on startup:

Jul 14 21:49:49 voice systemd[1]: Started wyoming-openwakeword.service - Wyoming OpenWakeWord.
Jul 14 21:49:52 voice run[10677]: INFO:root:Ready
Jul 14 21:49:53 voice run[10677]: ERROR:asyncio:Task exception was never retrieved
Jul 14 21:49:53 voice run[10677]: future: <Task finished name='wyoming event handler' coro=<AsyncEventHandler.run() done, defined at /home/voice/wyoming-openwakeword/.venv/lib/python3.11/site-packages/wyoming/server.py:31> exception=AssertionError()>
Jul 14 21:49:53 voice run[10677]: Traceback (most recent call last):
Jul 14 21:49:53 voice run[10677]:   File "/home/voice/wyoming-openwakeword/.venv/lib/python3.11/site-packages/wyoming/server.py", line 41, in run
Jul 14 21:49:53 voice run[10677]:     if not (await self.handle_event(event)):
Jul 14 21:49:53 voice run[10677]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 14 21:49:53 voice run[10677]:   File "/home/voice/wyoming-openwakeword/wyoming_openwakeword/handler.py", line 124, in handle_event
Jul 14 21:49:53 voice run[10677]:     assert self.model is not None
Jul 14 21:49:53 voice run[10677]:            ^^^^^^^^^^^^^^^^^^^^^^
Jul 14 21:49:53 voice run[10677]: AssertionError

Any ideas? I'm no good with Python async. 😁

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.

4 participants