Porcupine Wake Word not detectet (german profile)

Hello Rhasspy-Community,

because of Snips being sold to Sonos, I paused my work on building my own offline voice assistant.
Now, that I want to aim at this goal again, I would like to go with Rhasspy, which looks even more like the thing I needed than Snips.

I found the hackster guide of Carlos and Samreen from Matrix Labs and saw that they are livestreaming episodes on Rhasspy now, which is absolutely great for me as a non-programmer. They also made an interview with @synesthesiam, which was very nice :slight_smile:

my setup:

  • Raspberry Pi 3B+
  • Raspbian Buster
  • Matrix Voice as Microphone
  • Rhasspy Version 2.4.19

the situation:
I was able to follow the guide till the end. The only thing I changed is setting the profile to “de”, so the command to start Rhasspy was:

docker run -d -p 12101:12101 \
  --restart unless-stopped \
  -v "$HOME/.config/rhasspy/profiles:/profiles" \
  --device /dev/snd:/dev/snd \
  synesthesiam/rhasspy-server:latest \
  --user-profiles /profiles \
  --profile de

I saw that Rhasspy now has pocketshinx as default wake word engine but followed the tutorial and went with Procupine.

the problem:
Rhasspy does neither react on the default porcupine wake word “Porcupine” nor on the german translation “Stachelschwein”. The Log stays empty.

what I tried:

  • I tried to pronounce “Porcupine” in a german and some different other ways.

  • I restartet the Pi and Rhasspy several times and rechecked the settings.

  • I checked if the Matrix Voice is working as microphone with:

    arecord recording.wav -f S16_LE -r 16000 -d 5
    aplay recording.wav
    

    It was working.

  • I went to “Speech” in the web interface and used “Hold to record” for a test. Some logs appeared showing things I might have said (recognition was not that good btw).

  • I went to “Log”, cleared it and used “Wake” in the top right corner. Some logs appeared showing things I might have said (recognition was not that good again)

what would help:
If anyone has an idea on what to try next or what to do to solve the problem, please help me with this. I was thinking about trying it with the english profile, but I’m not sure, if I just have to use the code above again, but with “en” instead of “de” or if there is another way to change it. Also, I would love to get some hints on optimizing the german speech recognition.

Thanks to @romkabouter for showing me the Rhasspy-Community :slight_smile:

Best wishes
RaspiManu

For the wake word Porcupine is only working for English language phonemes so you have to pronounce the wake word with your best English accent for Porcupine to detect it.

As far as I know English is the only language supported by Porcupine :

You should try with a Snowboy universal wakeword like Alexa or Snowboy or train your own (before they shutdown their platform at the end of the year).

If you have time, you can try to train a Mycroft Precise model…

For ASR in German, I recommend using Kaldi.

Thank you for the fast response @fastjack (pun intended) :slight_smile:
Good to know, that porcupine only supports English at the moment.

I tried using Snowboy with the following steps:

  1. selected Snowboy under “Wake Word” in the settings
  2. saved settings with the button right under “Wake Word”
  3. restartet Rhasspy
  4. downloaded the needed files (pop up window)
  5. restartet Rhasspy
  6. trained Rhasspy
  7. restartet Rhasspy

Sadly, I could not get it working. The settings now show pocketsphinx again and after the Training, there was this problem notification:

Component: SnowboyWakeListener
Problem: Missing model
Description: Snowboy model could not be loaded from profiles/de/snowboy.umdl

I checked the profile folder and there was snowboy.umdl, but it was in another folder named snowboy. The Rhasspy Settings seemed to want snowboy.umdl right in the profile/de folder, so i used snowboy/snowboy.umdl for “Model Names”. After another Restart and Training, the problem shown above disappeared, but it’s still not working an Wake Word switched to pocketsphinx again.

It would be great if you could help me get this working.

Side Questions:

  • I googled “snowboy platform shutdown” and found nothing. Are they really going to shut it down or was it just a Snips related joke? :sweat_smile:
  • What is Kaldi and how can I use it? Sorry for being a complete newbie on this.
  • Do I need Home Assistant to use Rhasspy? I read a lot of posts in this forum today and saw a lot about Home Assistant and getting answers of Rhasspy over Home Assistant, if I got this right :sweat_smile:

Would love to get these side questions answered, too :slight_smile:

Regarding Snowboy, they announced it a few days ago on their Github repos:

Kaldi is one of Rhasspy speech to text service along with Pocketsphinx. It provides more accurate results than Pocketsphinx especially for English, German and French. To use it simply select it in the settings, download the required profile files (Rhasspy should do it automatically) and retrain.

Rhasspy does not do anything once it has recognized an intent, you have to do that part yourself. Some folks use HomeAssistant, other use NodeRed or Jeedom. Rhasspy was first made to be a HomeAssistant addon so it integrates easily with it but you can use many other solutions (see the documentation about intent handling).

As for the wakeword not triggering, try to play with the sensitivity, audio gain and frontend settings.
https://rhasspy.readthedocs.io/en/latest/wake-word/

Hope this helps.

Thanks for the info about the shutdown. Is Snowboy still worth using or will I have to change my Wake Word toolkit by the end of the year? What is the difference between Snowboy and Mycroft Precise?

Regarding Kaldi:
I am not able to choose it in my settings (see Screenshot below). Did I do anything wrong or do I have to do some work before it is available to choose?

Regarding Intent Handling:
Could you tell me the difference between Home Assistant, NodeRed and Jeedom in a few words, please? If I want to send my intents to an intent handler and would for example choose Home Assistant, do I need to have a second Raspberry Pi running a Home Assistant Server or can I build the whole Rhasspy voice assistant on one Raspberry Pi? Sorry, but I know nothing about this Topic :sweat_smile:

Regarding Snowboy:
I looked at the documentation and saw, that I have to add the following to my profile:

"wake": {
    "system": "snowboy",
    "hermes": {
       "wakeword_id": "default"
    },
    "snowboy": {
        "model": "snowboy/snowboy.umdl",
        "audio_gain": 1,
        "sensitivity": "0.5",
        "apply_frontend": false
    }
},

"rhasspy": {
    "listen_on_start": true
}

I did not read about adding something to my profile in the hackster tutorial mentioned above. Is this an essential thing to do and where do I add it?

Regarding Setting Changes:
It seems to me, like everytime I change my settings, they go back to default. Do you know, why this happens?

With regards to the Kaldi message not being available, double check that your profile on the Settings tab is still the correct one, as indicated by the 2 letters at the top of the page, e.g. en for English or nl for Dutch.

I have had issues myself with settings not correctly being saved and that the profile in the webinterface seemed to be switched from nl to en. Restarting Rhasspy solves that issue for me, not knowing what the actual rootcause is.

For the difference between Home Assistant, NodeRed and Jeedom, it is worth looking around at their respective websites. The former and latter one are opensource platform solutions for automating your home, wheras NodeRed is a visual programming environment that is mainly focused only on automation, not on integrating tons of different hardware devices.

As @fastjack mentioned, these are used to execute the instruction you gave to Rhasspy, e.g. to turn on a lamp.

For Snowboy you should have to select the option in the Settings tab rather than Porcupine. The JSON object you copied from the documentation is what is saved in the profile.json file that is shown on the Advanced tab. You should not change the more advanced settings of Snowboy if things work. This is not shown in the tutorial because they use Porcupine as a wakeword, not Snowboy.

Hi,
Kaldi: I’ve also got the notice, that Kaldi is not compatible with German profile.
The only way to get it running, was to install the English profile at first and select Kaldi in the GUI. Then some Kaldi-files had been loaded from the web.
Then I stopped the docker container (with the English profile).
After that. I installed the German profile.
Now Kaldi was selectable in the German profile and also loaded some missing files from the web.

I’ve installed Rhasspy V 2.5-pre some times and the behavior is always the same.
In the past, I also must do this when installing Rhasspy V 2.4.19

BTW: For me, Kaldi does the best job for speech recognition.

@geoffrey:
Thank you very much for explaining this to me. Because of Rhasspy being initially created to work with Home Assistant I might go with this one. At the moment I had the Kaldi problem, I only had a german profile, so a “hidden profile switch” could not have happened, but thanks for the hint on that :slight_smile:

@Jorg_Baumann:
I tried to do it like you described with the following steps:

  1. stopped docker container with german profile
  2. started Rhasspy with --profile en
  3. went to the web interface settings and chose Kaldi for Speech Recognition
  4. saved settings
  5. restarted Rhasspy
  6. trained Rhasspy

Sadly, there was no pop up window offering me some files to download for Kaldi and Kaldi is not available for the english profile as well now (like screenshot above). Do you have another hint for me?

BTW:
Porcupine Wake Word worked quite good in english profile. Sadly, I still can’t get a wake word working in german profile.

I thought about our conversation and saw that my problem is bigger than mentioned in this topic’s initial description. Because of this, I started a new topic on the “real problem”. Would be very nice, if you join the conversation there :slight_smile:

Really? I started a docker with a German profile and got my kaldi working without workaround. I am not 100% sure if I used the web gui for the first time or added it to the config first, then reloaded but I was offered a download after saving and after I downloaded it wokred.