From the docs about snowboy is said that a social media account is needed to use my ow wake word. I am trying Rhasspy because it is totally offline and protects my privacy. Is my privacy in any way compromised if using snowboy? And if I create a custom wake word?
Could you please clarify this? Sorry if it is a silly question…
I also have a particular situation that I would like to hear your opinion:
If something turns ON and OFF using 2 scripts in HA, how would be your suggestion to create in Sentences?
Not a silly question; it’s at the heart of why I created Rhasspy
Snowboy requires an account to create a custom wakeword, but it works offline after that. You have to upload 3 examples of you saying the wake word, and then you download a .pmdl file. It’s a compromise: snowboy is superior to any of the other options, but you do need to give them some info and WAV files.
Mycroft Precise is a great alternative; it can be trained completely offline. But the training process is much more complex. I’ve been working on a docker image to help with this, but it’s not quite ready.
It depends. If you have “on” and “off” words in your sentences, you can just tag them and then filter on the property in HA (like the {when} tag in the weather example). Another option is to create two separate intents:
[TurnOnSomething]
turn on the thing
[TurnOffSomething]
turn off the thing
And then you just need to handle rhasspy_TurnOnSomething and rhasspy_TurnOffSomething separately in the HA automations.
Since the rhasspy wake word always stop workin after some minutes, I am giving some priority to snowboy, but I could not make it work. I don’t kbow if I am doing something wrong (probably yes).
I also would like to control a light brightness. Sure it can be done in the hard way, with dozens sentences, one for each variant. I am sure there is a smarter way to do it. Can you shed some light how it can be done? Maybe the work is more in the HA side… Thanks.
brightness = (20 | 50 | 80)
rooms = (livingroom | bedroom | kitchen)
set the <rooms>{room} light to <brightness> [percent]
set the light [in] [the] <rooms>{room} to <brightness> [percent]
Maybe the numbers should be twenty, fiftym eighty, you can try it out
Yes, that’s what I tryied. But it seems that it does not liked the numbers.
I thought the same, about using written numbers, but did not try yet. Don’t know if I could try it today.
Maybe someone else could give some hint before I try.
You shouldn’t need the snowboy add-on with an Rpi 3 B. I need to make this more clear in the documentation.
You should just need to do two things now:
Copy a .pmdl or .umdl file into your Rhasspy profile directory (should be in your Hass.io share directory – something like /share/rhasspy/profiles/en).
Set the snowboy model name to be the file name, e.g. snowboy.umdl
The speech recognition system wants words instead of numbers (there are some complicated ways around this, but probably not worth it for you just yet).
Instead, I’d recommend mapping the words back to numbers in HA. Assuming you have something like this in Rhasspy:
[SetBrightness]
brightness = (high | medium | low)
set the light to (<brightness>){brightness}
you can use a dictionary lookup back in your HA automation template to get a number out:
That’s an important tip. Avoiding to generate my own wake word, I found some umdl files snowboy/resources/models at master · Kitt-AI/snowboy · GitHub, including snowboy.umdl.
Tryed with that, but it didn’t worked. At first I thought that it maybe could not match my voice or something like that, but I noticed that when using “okay rhasppy”, a led in my USB dongle where the microphone is attached blinks. When I set to snowboy in settings (with snowboy.umdl in model), it does not blink, which I undestand that USB dongle is not listening. Any thought?
ModuleNotFoundError: No module named '_snowboydetect'
DEBUG:DialogueManager:intent_trainer started
DEBUG:DialogueManager:speech_trainer started
DEBUG:DialogueManager:sentence_generator started
DEBUG:DialogueManager:recorder started
DEBUG:DialogueManager:player started
DEBUG:DialogueManager:recognizer started
DEBUG:DialogueManager:handler started
DEBUG:DialogueManager:command started
DEBUG:DialogueManager:hass_handler started
DEBUG:PocketsphinxDecoder: -> started
INFO:PocketsphinxDecoder:Loading decoder with hmm=/usr/share/rhasspy/profiles/en/acoustic_model, dict=/share/rhasspy/profiles/en/dictionary.txt, lm=/share/rhasspy/profiles/en/language_model.txt
DEBUG:PocketsphinxDecoder:started -> loaded
DEBUG:DialogueManager:decoder started
WARNING:DialogueManager:Actor timeout! Loading anyway...
WARNING:SnowboyWakeListener:Unhandled message in state started: <rhasspy.wake.ListenForWakeWord object at 0x74e42070>
INFO:app:Restarted Rhasspy
DEBUG:DialogueManager:loading -> ready
WARNING:SnowboyWakeListener:Unhandled message in state started: <rhasspy.dialogue.Ready object at 0x74e42630>
INFO:DialogueManager:Automatically listening for wake word
DEBUG:DialogueManager:ready -> asleep
DEBUG:app:Loading phoneme examples from /usr/share/rhasspy/profiles/en/phoneme_examples.txt
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Thanks for the suggestion. After some time and trial and error, I could get it to work.
I could make most of the sentences in rhasspy and automations in HA that I wanted to do, but now I am stuck since the wake word stops to work in a few minutes, having to restart again. It works for testing purposes but I could not use it in a normal usage.
Trying to switch to snowboy, following the above instructions was not successful. It seems that it is something related to this error:
ModuleNotFoundError: No module named ‘_snowboydetect’
That error suggests snowboy didn’t actually get installed inside the Rhasspy docker container. If I recall, I actually took out snowboy from all of the ARM-based containers (Rpi) because they had problems with my base image.
I see that Kitt.AI has a new version sitting in their Github repo, so I might give that a try and see if the problem has been fixed. Let me get back to you.
I appreciate your effort in solving this problem. The way it is, all my efforts might be in vain since I can’t use rhasspy assistant the way it is now.
By the way, do you know the reason why it stops from working everytime a few minutes after a restart? Others are having this same issue?
I have the same problem.
After a few minutes, no matter if I use it or let it alone, the wake word does not work anymore (not using Hass.io).
I had the older version of Rhasspy running which used snowboy and this worked without stopping after some minutes. However, the wake word was detected too often, even if there was only some noise.
Because I use a NUC, I will try the snowboy approach again.
It wasn’t clear to me if everything stops or only the wake word detection.