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

Porcupine wake word #20

Open
thegnuu opened this issue Jan 12, 2021 · 6 comments
Open

Porcupine wake word #20

thegnuu opened this issue Jan 12, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@thegnuu
Copy link

thegnuu commented Jan 12, 2021

I am currently trying to add a wake word to porcupine but somehow I am not able to figure out how this is done.

I just added it to my profile at the following path /share/rhasspy/profiles/en/porcupine/jarvis.ppn.
This matches the config of my Rhasspy Add-On.
Setting the name of the file is not working and the refresh button does nothing as well.

Am I missing something here?

I used Rhasspy on a dedicated PI before and setting this up worked without any issues.

@MikeLDPT
Copy link

Hi @thegnuu. I am having the same issue.

I was a little surprised that there was no ../en/porcupine/ directory with .ppn created automatically on choosing porcupine as the wake word engine with Rhasspy (on Hassio). I created the directory manually and placed a downloaded .ppn file in there. Save and restart and "refresh" causes timeout after a quite a few seconds and no words populate the Available Keywords: box.

Have you managed to resolve the issue by any chance?

I notice that there are errors in the Rhasspy log:

[ERROR:2021-01-21 16:17:03,233] rhasspyserver_hermes:
Traceback (most recent call last):
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1869, in dispatch_request
return await handler(**request_.view_args)
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py", line 826, in api_wake_words
hotwords = await core.get_hotwords()
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py", line 887, in get_hotwords
handle_finished(), messages, message_types
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py", line 971, in publish_wait
result_awaitable, timeout=timeout_seconds
File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

I hope someone has cracked this one!

@thegnuu
Copy link
Author

thegnuu commented Jan 21, 2021

@MikeLDPT It seems like an issue with Rhasspy itself.

I have not tested it right now, since I just used one of my spare PIs to run Rhasspy on it, but it looks like there was an update of porcupine in 2.5.9 which might resolve this issue!

See this:
https://community.rhasspy.org/t/wake-word-porcupine-help-is-needed/2104/14?u=thegnuu

Have you tested it with 2.5.9?

@Mouky66
Copy link

Mouky66 commented Jan 21, 2021

Same issue with 2.5.9

@MikeLDPT
Copy link

Yes, I can concur that I'm running 2.5.9.... The changelog in Rhasspy mentions: "Upgrade porcupine wake word system to 1.9". Seems the latest version of prcupine is 1.9.

I have tried using Raven insetad and that does not seem to have any issues with updating the wake config files. It places the .wav files in the \rhasspy\profiles\en\raven directory OK.

It "feels" like an error with Porcupine knowing exactly where the .ppn file is. No idea really though as yet.

@synesthesiam
Copy link
Owner

I was a little surprised that there was no ../en/porcupine/ directory with .ppn created automatically on choosing porcupine as the wake word engine with Rhasspy (on Hassio).

The porcupine Python package includes all the default keywords in its install directory. Only custom keywords need to go in the profile.

I just added it to my profile at the following path /share/rhasspy/profiles/en/porcupine/jarvis.ppn.

This looks correct to me, but I will need to test again on Hass.io. Testing on my desktop, creating a ".ppn" file in the en/porcupine directory and hitting Refresh immediately shows the new keyword.

While I look into this more, I'll update the web UI to show the exact path where it's expecting the files 👍

@synesthesiam synesthesiam added the bug Something isn't working label Jan 26, 2021
@MikeLDPT
Copy link

Thank you Synesthesiam. In case it helps, here are a couple of screen shots. I am running this under Hassio on a raspberry pi and assume I have chosen the corect format .ppn file. I downloaded again the porcupine_raspberry-pi.ppn from github and placed it here:

image

I then chose Porcupine as the wake word engine. Raven was previously chosen. The configuration looks like this, and when you click on the drop down to select "available keywords" nothing is there. Clicking on refresh causes the timeout error after a number of seconds:

image

which causes the error messages in the log:

[ERROR:2021-01-28 15:31:30,327] rhasspyserver_hermes:
Traceback (most recent call last):
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1869, in dispatch_request
return await handler(**request_.view_args)
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py", line 826, in api_wake_words
hotwords = await core.get_hotwords()
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py", line 887, in get_hotwords
handle_finished(), messages, message_types
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py", line 971, in publish_wait
result_awaitable, timeout=timeout_seconds
File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

Raven on the other hand had no problems putting the Wav files in its alloted directory, and so it seems raven can find and access the directory area :

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants