Porcupine with french wake word

Hi !
I try to use porcupine with french wake word found here : porcupine/resources/keyword_files_fr at 041fc8b579a2cc6ef317f93a031632b46acdbe62 · Picovoice/porcupine · GitHub

It breaks porcupine with this error:

[DEBUG:2021-07-31 02:00:39,824] rhasspywake_porcupine_hermes: Loading porcupine (kw=['/home/pi/.config/rhasspy/profiles/fr/porcupine/mon chouchou_raspberry-pi.ppn'], kwdirs=['/home/pi/.config/rhasspy/profiles/fr/porcupine', '/home/pi/rhasspy-2.5.10-beta/.venv/lib/python3.7/site-packages/pvporcupine/resources/keyword_files/raspberry-pi'], sensitivity=[0.7])                                                                                                                 
[ERROR] Keyword files (.PPN) and model file (.PV) should belong to the same language. Keyword files belongs to 'fr' while model file belongs to 'en'.                                                                                      
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/rhasspy-2.5.10-beta/rhasspy-wake-porcupine-hermes/rhasspywake_porcupine_hermes/__main__.py", line 260, in <module>                                                                                                        
  File "/home/pi/rhasspy-2.5.10-beta/rhasspy-wake-porcupine-hermes/rhasspywake_porcupine_hermes/__main__.py", line 127, in main                                                                                                            
    keyword_paths=[str(kw) for kw in args.keyword], sensitivities=sensitivities
  File "/home/pi/rhasspy-2.5.10-beta/.venv/lib/python3.7/site-packages/pvporcupine/__init__.py", line 68, in create
  File "/home/pi/rhasspy-2.5.10-beta/.venv/lib/python3.7/site-packages/pvporcupine/porcupine.py", line 94, in __init__
    raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]()

How can I set up porcupine with french wake words ?


Models (.PV) files of porcupines are here:

So line 127 in /home/pi/rhasspy-2.5.10-beta/rhasspy-wake-porcupine-hermes/rhasspywake_porcupine_hermes/__main__.py I add the argument model_path to point to the french PV file and it works.

Next step would be to have it configurable in the profile and the web interface.

that’s cool but what are the words
en français évidemment
sorry I just looked at the first link properly.
mon chouchou

I’m having a bit of trouble with Raven so I’ll give these a go.
Thanks for the heads up.

actually I just created the directory porcupine in my profile and that worked fine.

Porcupine doesn’t like my accent in either english or french. HAHA
So I’ll have to go the tensorflow route.
but for anyone else
create the directory
$HOME/.config/rhasspy/profiles/fr/porcupine and stick the ppn files there.

I experience any issues on the deb version. I didn’t try the docker though.

After a couple of wake word issues with raven, fews false positives, CPU high consumption I am trying to use another wake word, with porcupine as recommended by rhasspy, however It seem that there is no many user almost with a french wake word. As tjiho I downloaded somes one as framboise_raspberry-pi.ppn and copy to …/fr/porcupine/ folder . cleanup raven profile, switch to porcupine And curiously first, I can’t list Available keywords into the setting. No directory appear above keyword File field :

After a reboot and restart, not error seen in log below…

I use buster lite on raspiberry 2 and installed rhasspy_2.5.9_armhf.deb without error (no docker)
Important : I tested successfully in the first time with porcupine keyword before switch to french keyword.
Not like tjiho and some one else, directory doesn’t appear into setting.
any idea or some one use porcupine with french keyword successfully. Or do you advise to use another wakeword ? out of the box of course.
I didn’t manually modify profiles.json and show you the wakeword lines:

"wake": {
        "porcupine": {
            "keyword_path": "framboise_raspberry-pi.ppn"
        "raven": {
            "keywords": {
                "Macabanne": {
                    "enabled": true
        "system": "porcupine"

Logs below

[DEBUG:2021-12-07 23:16:07,459] rhasspyprofile.download: text_to_speech.system larynx picotts = False
[DEBUG:2021-12-07 23:16:07,457] rhasspyprofile.download: speech_to_text.kaldi.open_transcription True False = False
[DEBUG:2021-12-07 23:16:07,456] rhasspyprofile.download: speech_to_text.deepspeech.mix_weight >0 0 = False
[DEBUG:2021-12-07 23:16:07,454] rhasspyprofile.download: speech_to_text.kaldi.mix_weight >0 0 = False
[DEBUG:2021-12-07 23:16:07,453] rhasspyprofile.download: speech_to_text.pocketsphinx.mix_weight >0 0 = False
[DEBUG:2021-12-07 23:16:07,451] rhasspyprofile.download: speech_to_text.deepspeech.open_transcription True False = False
[DEBUG:2021-12-07 23:16:07,449] rhasspyprofile.download: speech_to_text.pocketsphinx.open_transcription True False = False
[DEBUG:2021-12-07 23:16:07,447] rhasspyprofile.download: speech_to_text.system deepspeech kaldi = False
[DEBUG:2021-12-07 23:16:07,446] rhasspyprofile.download: Skipping kaldi/model/ivectors_test_hires/conf/splice.conf (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/ivectors_test_hires/conf/splice.conf)
[DEBUG:2021-12-07 23:16:07,445] rhasspyprofile.download: Skipping kaldi/model/ivectors_test_hires/conf/online_cmvn.conf (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/ivectors_test_hires/conf/online_cmvn.conf)
[DEBUG:2021-12-07 23:16:07,443] rhasspyprofile.download: Skipping kaldi/model/ivectors_test_hires/conf/ivector_extractor.conf (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/ivectors_test_hires/conf/ivector_extractor.conf)
[DEBUG:2021-12-07 23:16:07,442] rhasspyprofile.download: Skipping kaldi/model/extractor/global_cmvn.stats (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/extractor/global_cmvn.stats)
[DEBUG:2021-12-07 23:16:07,440] rhasspyprofile.download: Skipping kaldi/model/extractor/final.dubm (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/extractor/final.dubm)
[DEBUG:2021-12-07 23:16:07,438] rhasspyprofile.download: Skipping kaldi/model/extractor/splice_opts (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/extractor/splice_opts)
[DEBUG:2021-12-07 23:16:07,437] rhasspyprofile.download: Skipping kaldi/model/extractor/final.ie (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/extractor/final.ie)
[DEBUG:2021-12-07 23:16:07,435] rhasspyprofile.download: Skipping kaldi/model/extractor/online_cmvn.conf (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/extractor/online_cmvn.conf)
[DEBUG:2021-12-07 23:16:07,434] rhasspyprofile.download: Skipping kaldi/model/extractor/final.mat (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/extractor/final.mat)
[DEBUG:2021-12-07 23:16:07,432] rhasspyprofile.download: Skipping kaldi/model/phones/silence_phones.txt (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/phones/silence_phones.txt)
[DEBUG:2021-12-07 23:16:07,431] rhasspyprofile.download: Skipping kaldi/model/phones/extra_questions.txt (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/phones/extra_questions.txt)
[DEBUG:2021-12-07 23:16:07,429] rhasspyprofile.download: Skipping kaldi/model/phones/nonsilence_phones.txt (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/phones/nonsilence_phones.txt)
[DEBUG:2021-12-07 23:16:07,427] rhasspyprofile.download: Skipping kaldi/model/phones/optional_silence.txt (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/phones/optional_silence.txt)
[DEBUG:2021-12-07 23:16:07,426] rhasspyprofile.download: Skipping kaldi/model/model/cmvn_opts (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/model/cmvn_opts)
[DEBUG:2021-12-07 23:16:07,424] rhasspyprofile.download: Skipping kaldi/model/model/den.fst (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/model/den.fst)
[DEBUG:2021-12-07 23:16:07,423] rhasspyprofile.download: Skipping kaldi/model/model/tree (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/model/tree)
[DEBUG:2021-12-07 23:16:07,421] rhasspyprofile.download: Skipping kaldi/model/model/final.mdl (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/model/final.mdl)
[DEBUG:2021-12-07 23:16:07,419] rhasspyprofile.download: Skipping kaldi/model/model/normalization.fst (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/model/normalization.fst)
[DEBUG:2021-12-07 23:16:07,418] rhasspyprofile.download: Skipping kaldi/model/conf/mfcc_hires.conf (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/conf/mfcc_hires.conf)
[DEBUG:2021-12-07 23:16:07,416] rhasspyprofile.download: Skipping kaldi/model/conf/online_cmvn.conf (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/conf/online_cmvn.conf)
[DEBUG:2021-12-07 23:16:07,415] rhasspyprofile.download: Skipping kaldi/model/conf/mfcc.conf (/home/pi/.config/rhasspy/profiles/fr/kaldi/model/conf/mfcc.conf)
[DEBUG:2021-12-07 23:16:07,413] rhasspyprofile.download: Skipping kaldi/g2p.fst (/home/pi/.config/rhasspy/profiles/fr/kaldi/g2p.fst)
[DEBUG:2021-12-07 23:16:07,411] rhasspyprofile.download: Skipping kaldi/base_dictionary.txt (/home/pi/.config/rhasspy/profiles/fr/kaldi/base_dictionary.txt)
[DEBUG:2021-12-07 23:16:07,410] rhasspyprofile.download: speech_to_text.system kaldi kaldi = True
[DEBUG:2021-12-07 23:16:07,409] rhasspyprofile.download: speech_to_text.system pocketsphinx kaldi = False
[INFO:2021-12-07 23:16:07,273] rhasspyserver_hermes: Started
[DEBUG:2021-12-07 23:16:07,271] rhasspyserver_hermes: Subscribed to hermes/audioServer/default/audioSummary
[DEBUG:2021-12-07 23:16:07,269] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured
[DEBUG:2021-12-07 23:16:07,268] rhasspyserver_hermes: Subscribed to hermes/hotword/+/detected
[DEBUG:2021-12-07 23:16:07,266] rhasspyserver_hermes: Subscribed to rhasspy/asr/default/default/audioCaptured
[DEBUG:2021-12-07 23:16:07,264] rhasspyserver_hermes: Subscribed to hermes/nlu/intentNotRecognized
[DEBUG:2021-12-07 23:16:07,263] rhasspyserver_hermes: Subscribed to hermes/intent/#
[DEBUG:2021-12-07 23:16:07,261] rhasspyserver_hermes: Subscribed to hermes/audioServer/default/audioSummary
[DEBUG:2021-12-07 23:16:07,259] rhasspyserver_hermes: Subscribed to rhasspy/asr/default/default/audioCaptured
[DEBUG:2021-12-07 23:16:07,258] rhasspyserver_hermes: Subscribed to hermes/nlu/intentNotRecognized
[DEBUG:2021-12-07 23:16:07,256] rhasspyserver_hermes: Subscribed to hermes/intent/#
[DEBUG:2021-12-07 23:16:07,255] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured
[DEBUG:2021-12-07 23:16:07,253] rhasspyserver_hermes: Subscribed to hermes/hotword/+/detected
[DEBUG:2021-12-07 23:16:07,251] rhasspyserver_hermes: Connected to MQTT broker
[DEBUG:2021-12-07 23:16:07,242] rhasspyserver_hermes: Connecting to (retries: 0/10)
[DEBUG:2021-12-07 23:16:07,241] rhasspyserver_hermes: Starting core
[DEBUG:2021-12-07 23:16:07,230] rhasspyprofile.profile: Loading default profile settings from /usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/defaults.json
[DEBUG:2021-12-07 23:16:07,227] rhasspyprofile.profile: Loading /home/pi/.config/rhasspy/profiles/fr/profile.json
[DEBUG:2021-12-07 23:16:07,221] rhasspyprofile.profile: Loading /usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/fr/profile.json
[DEBUG:2021-12-07 23:16:06,750] rhasspyserver_hermes: Restarting Rhasspy 

it’s a bit unreliable the listing. If it not detects your word, check if it’s in the right directory :
home/pi/.config/rhasspy/profiles/fr/porcupine and write it directly in the field.

Maybe it does not work because you downloaded the v2 version of the wake word model. Rhasspy uses v1.x of porcupine.

This link display good version of wake word models.

I completely reinstalled rhasspy few days ago, and I get the same problem as before. It wants the path to the french “.pv” file to be able to works with french wake words.

A good first step to test if porcupine works is to start with english wake word just to see if you have the same problem.

Thanks for your initial idea to add complete path with file in keyword file field:


That work only with path and I shouldn’t select file from available keywords field ?!?!?!
I use Raspberry 2B with seed 4mic, with 3dB of gain and sensibility to 0,38 and work file with only english keyword :roll_eyes: for the moment.
I will test for some times and switch to a french keyword after.

A last question tjiho; I didn’t seen where I should add porcupine_params_fr.pv and set it to enable ? could you detail, please. I will try it in somes day …
have a good day !

Hi tom,
I edited "/usr/lib/rhasspy/rhasspy-wake-porcupine-hermes/rhasspywake_porcupine_hermes/nano main.py ( not same path because 2.5.9 )

 porcupine_handle = pvporcupine.create(
        keyword_paths=[str(kw) for kw in args.keyword], sensitivities=sensitivities

what kind of line did you added around lines above with model_path argument ?
I seen that french model.pv version is 2.0 , compatible with V1.0 ppn ?
good day !

Hi !

I think you should use version V1.0 of the PV file.

In this line you can do:

 porcupine_handle = pvporcupine.create(
        keyword_paths=[str(kw) for kw in args.keyword],

Another solution is to erase the PV file located in .venv/lib/python3.9/site-packages/pvporcupine/lib/common/ by the french PV file.

hi tom,
I took little time to test with the right porcupine_params_fr.pv ( v1.9 ) and model_path setting
and work fine !!. that better W.A.F_ly
merry christmas all !

I am back on this topics because since I update my RPI 2 with 2.5.11 deb package
french porcupine wakeword doesn’t work
previews 2.5.8 worked with v1 french wakework and porcupine_params_fr.pv files manually added.
Someone already did a similar improve ?
thanks in advance for your ideas.

Hi @berniland was able to use porcupine v2 which worked better with rhasspy. You can see steps to run it from your rhasspy at the following link: PicoVoice offline Voice AI engine gets free tier for up to 3 users - #8 by Sturi2011

Thanks bezbez1 I will have a look and test. Hope that french keywords available as well.
for waf reason :yum: