Personal wake word is not recognized


#1

After updating to snips 0.60.8 my personal hotword isn’t recognized anymore.

Assistant with hey snips works fine.

I just started to train a new model following the tutorial.

The model can be trained

Press enter to record one sample, say your hotword when "recording..." shows up
recording...
finished recording

Your model has been saved in /home/pi/snips-record-personal-hotword/personal_2018_12_24T14_37_44

, but when i come to the step by checking the model, nothing is recognized, i keep saying my hotword a hundred times:

pi@raspberrypi:~/snips-record-personal-hotword $ sudo systemctl stop snips-hotword; sudo systemctl stop snips-dialogue; sudo systemctl start snips-audio-server;
pi@raspberrypi:~/snips-record-personal-hotword $ snips-hotword --model  /home/pi/snips-record-personal-hotword/personal_2018_12_24T14_37_44=0.5    [14:40:43.357698] INFO :snips_hotword::server: Using model from /home/pi/snips-record-personal-hotword/personal_2018_12_24T14_37_44
[14:40:43.499541] INFO :snips_hotword::server: Discovered audio_server default/mqtt, starting hotword listener
[14:40:43.499625] INFO :snips_hotword::server: Connecting using MQTT site-id default
[14:40:43.500091] INFO :snips_hotword_lib::audio: Audio thread for default started
[14:40:43.500529] INFO :snips_hotword_lib::audio: Net and VAD thread for site default started (vad inhibitor: true, vad messages: false
[14:40:43.504533] INFO :snips_hotword_lib       : Detector "detector.hey_brauni2.default", sensitivity: 0.5, threshold 0.5
[14:40:43.504967] INFO :snips_hotword_lib       : detector.hey_brauni2.default thread started

if i start the hotword detector with additional verbose mode, i get:

[15:55:51.994321] INFO :snips_hotword::server       : Discovered audio_server default/mqtt, starting hotword listener
[15:55:51.994381] INFO :snips_hotword::server       : Connecting using MQTT site-id default
[15:55:51.994795] DEBUG:snips_hotword_lib           : attempt to start detector for default and hey_brauni2
[15:55:51.994967] INFO :snips_hotword_lib::audio    : Audio thread for default started
[15:55:51.995354] INFO :snips_hotword_lib::audio    : Net and VAD thread for site default started (vad inhibitor: true, vad messages: false
[15:55:51.995595] DEBUG:rumqtt::connection          : Send: Subscribe(Subscribe { pid: PacketIdentifier(4), topics: [SubscribeTopic { topic_path: "hermes/audioServer/default/audioFrame", qos: AtMostOnce }] })
[15:55:51.995981] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received control message Suback(Suback { pid: PacketIdentifier(4), return_codes: [Success(AtMostOnce)] })
[15:55:51.999325] INFO :snips_hotword_lib           : Detector "detector.hey_brauni2.default", sensitivity: 0.5, threshold 0.5
[15:55:51.999959] INFO :snips_hotword_lib           : detector.hey_brauni2.default thread started
[15:55:52.046253] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received message on hermes/audioServer/default/audioFrame
[15:55:52.046637] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received message on hermes/audioServer/default/audioFrame
[15:55:52.086810] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received message on hermes/audioServer/default/audioFrame
[15:55:52.087179] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received message on hermes/audioServer/default/audioFrame
[15:55:52.087474] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received message on hermes/audioServer/default/audioFrame
[15:55:52.087734] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received message on hermes/audioServer/default/audioFrame
[15:55:52.136496] DEBUG:rumqtt::connection          : snips-hotword|8120-raspberrypi-1 Received message on hermes/audioServer/default/audioFrame

So it seems that audioFrames are recorded, but no detection is made.

Anyone else with similiar problems?


#2

Same here!

I just updated snips to 0.60.8 (from 0.60.1) and my previuosly recorded hotword is not recognised anymore. No time to inverstigate right now, but keep you posted if I find something out.

PS: also my “customtts” with SnipsSuperTTS.sh is not working anymore right now.


#3

Well, I did update as well and both SnipsSuperTTS and my personal wakewords are working


#4

I changed the assistant back to hey snips, reinstalled it via sam and commented out the model line in /etc/snips.toml and everything works fine again.
So I can say the hardware setup should be fine.


#5

and when you installed the update did you overwrite the snips.toml file?? as this would return it back to default
check your toml file still has your personal hotword info


#6

Doublechecked it, the sam install does not modify the model line in the toml file.

And as you can read in my initial post it also won’t work if I pass the model directly via model parameter in the command line


#7

going to have to test bit by bit…
-make sure you can record a wav file and play it back and make sure that’s all still working fine and that the playing file is clean and clear
-check the /var/log/syslog file and see if there is any other errors going on with the snips system outside of hotword… ie is the snips-audio-server is failing somewhere then the hotword will never work
-double check that the paths are all correct

just going to have to work through it and see where the problem is
Like Psycho, I too have no problems after updating to 0.60.8… but if i had thee are all the types of things i would work through to see where the problem is


#8

Sure, thank you.

  • tested microphone/speaker with sam:

output of sam test microphone:

C:\Users\Kai>sam test microphone
i Plug in your microphone and turn on your speaker
Stopping snips audio server
√ Say something in the microphone, then press a key to continue...
√ Playing the recording
Relaunching snips-audio-server
i Didn't hear anything? Check the recording level of your microphone and the volume of the speaker.
i Alternatively you can run sam setup audio to setup your microphone

i could here my own voise clean and clear :slight_smile:

  • services are working well:

sam status:

Connected to device raspberrypi
OS version ................... Raspbian GNU/Linux 9 (stretch)
Installed assistant .......... Brauni Home
Language ..................... de
Hotword ...................... personal_hotword
ASR engine ................... snips
Status ....................... Live
Service status:
snips-analytics .............. 0.60.8 (running)
snips-asr .................... 0.60.8 (running)
snips-audio-server ........... 0.60.8 (running)
snips-dialogue ............... 0.60.8 (running)
snips-hotword ................ 0.60.8 (running)
snips-nlu .................... 0.60.8 (running)
snips-skill-server ........... 0.60.8 (running)
snips-tts .................... 0.60.8 (running)

i restarted services and checked the sys log:

Dec 25 11:20:10 raspberrypi systemd[1]: Started Session c15 of user pi.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips NLU...
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips Hotword...
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips Skill Server...
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips Hotword.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips Audio Server...
Dec 25 11:20:10 raspberrypi snips-skill-server[4473]: INFO:snips_skill_server_lib::runner            : was asked to stop, terminating childs before quitting...
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips Dialogue...
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips ASR...
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips Hotword.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips TTS...
Dec 25 11:20:10 raspberrypi systemd[1]: Stopping Snips Analytics...
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips NLU.
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips NLU.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips Analytics.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips TTS.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips Dialogue.
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips Dialogue.
Dec 25 11:20:10 raspberrypi snips-hotword[23498]: INFO:snips_hotword::server: Using model from /etc/snips/personal_2018_12_24T16_15_03
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips TTS.
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips Analytics.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips Skill Server.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips ASR.
Dec 25 11:20:10 raspberrypi systemd[1]: Stopped Snips Audio Server.
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips Audio Server.
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips ASR.
Dec 25 11:20:10 raspberrypi systemd[1]: Started Snips Skill Server.
Dec 25 11:20:10 raspberrypi snips-dialogue[23512]: INFO:snips_dialogue_hermes: Loading the configuration file
Dec 25 11:20:10 raspberrypi snips-nlu[23500]: INFO:snips_nlu_hermes: loading nlu engine "/usr/share/snips/assistant/nlu_engine"
Dec 25 11:20:10 raspberrypi snips-tts[23515]: INFO:snips_tts_hermes: starting with provider PicoTts
Dec 25 11:20:10 raspberrypi snips-dialogue[23512]: INFO:snips_dialogue_lib::config: Loading language de
Dec 25 11:20:10 raspberrypi snips-dialogue[23512]: INFO:snips_dialogue_hermes     : Starting...
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: searching dir for actions: /var/lib/snips/skills/snips-app-say-it-again
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: found action "/var/lib/snips/skills/snips-app-say-it-again/action-say-it-again.py"
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: searching dir for actions: /var/lib/snips/skills/.hue_cache
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: searching dir for actions: /var/lib/snips/skills/Snips-DatumUhrzeit
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: found action "/var/lib/snips/skills/Snips-DatumUhrzeit/action-currentDate-Datum_und_Uhrzeit.py"
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: found action "/var/lib/snips/skills/Snips-DatumUhrzeit/action-currentTime-Datum_und_Uhrzeit.py"
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: found action "/var/lib/snips/skills/Snips-DatumUhrzeit/action-dateInfo-Datum_und_Uhrzeit.py"
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: found action "/var/lib/snips/skills/Snips-DatumUhrzeit/action-weekNumber-Datum_und_Uhrzeit.py"
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: searching dir for actions: /var/lib/snips/skills/snips-skill-respeaker
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: found action "/var/lib/snips/skills/snips-skill-respeaker/action-app_respeaker"
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: searching dir for actions: /var/lib/snips/skills/snips-skill-hue-pro
Dec 25 11:20:10 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner: found action "/var/lib/snips/skills/snips-skill-hue-pro/action-philips_hue.py"
Dec 25 11:20:10 raspberrypi snips-audio-server[23520]: INFO:snips_broadcast_mqtt_server: Starting broadcasting audio on hermes as site "default"
Dec 25 11:20:10 raspberrypi snips-audio-server[23520]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
Dec 25 11:20:10 raspberrypi snips-audio-server[23520]: INFO:snips_audio_portaudio      : Use input device: "default"
Dec 25 11:20:10 raspberrypi kernel: [67852.511232] bcm2835-i2s 3f203000.i2s: I2S SYNC error!
Dec 25 11:20:10 raspberrypi snips-asr[23522]: INFO:snips_asr: Connecting using MQTT site-id default
Dec 25 11:20:10 raspberrypi snips-hotword[23498]: INFO:snips_hotword::server: Discovered audio_server default/mqtt, starting hotword listener
Dec 25 11:20:10 raspberrypi snips-hotword[23498]: INFO:snips_hotword::server: Connecting using MQTT site-id default
Dec 25 11:20:10 raspberrypi snips-asr[23522]: INFO:snips_asr_hermes: Using model from "/usr/share/snips/assistant/custom_asr"
Dec 25 11:20:10 raspberrypi snips-hotword[23498]: INFO:snips_hotword_lib::audio: Audio thread for default started
Dec 25 11:20:10 raspberrypi snips-hotword[23498]: INFO:snips_hotword_lib       : Detector "detector.hey_brauni.default", sensitivity: 0.5, threshold 0.5
Dec 25 11:20:10 raspberrypi snips-hotword[23498]: INFO:snips_hotword_lib::audio: Net and VAD thread for site default started (vad inhibitor: true, vad messages: false
Dec 25 11:20:10 raspberrypi snips-hotword[23498]: INFO:snips_hotword_lib       : detector.hey_brauni.default thread started
Dec 25 11:20:10 raspberrypi snips-asr[23522]: INFO:snips_kaldi::decode::model: Loading model v2
Dec 25 11:20:11 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner            : [philips_hue][out] [HUE] Available rooms:
Dec 25 11:20:11 raspberrypi snips-skill-server[23523]: INFO:snips_skill_server_lib::runner            : [philips_hue][out] living room
Dec 25 11:20:13 raspberrypi snips-asr[23522]: INFO:snips_asr_hermes          : Preparing decoder
Dec 25 11:20:13 raspberrypi snips-asr[23522]: INFO:snips_asr_hermes          : Idle
Dec 25 11:20:15 raspberrypi snips-nlu[23500]: INFO:snips_nlu_hermes: model loaded in 5111 ms
  • paths are correct

/etc/snips.toml:

[snips-hotword]
model = ["/etc/snips/personal_2018_12_24T16_15_03=0.5"]

and ls:

ls /etc/snips/personal_2018_12_24T16_15_03
0.wav  1.wav  2.wav  config.json

also aplay of the wav works and gives me the recorded hotword:

aplay /etc/snips/personal_2018_12_24T16_15_03/0.wav
Wiedergabe: WAVE '0.wav' : Signed 16 bit Little Endian, Rate: 16000 Hz, mono

This looks kind of strange to me:
Dec 25 11:20:10 raspberrypi kernel: [67852.511232] bcm2835-i2s 3f203000.i2s: I2S SYNC error!

but its more a audio play issue than something with recording i guess


#9

Is it possible to go back to 0.60.1 to verify that its an issue caused by the update?


#10

Try to change your assistant to use “hey snips” on the console and update your assistant. This way you’ll have both hey snips and your personal wake word, just to see if it works


#11

Which settings do I have to change?

I changed the wake word to hey snips in the console.

I uncommented the following line in /etc/snips.toml

[snips-hotword]
model = ["/etc/snips/personal_2018_12_24T16_15_03=0.5"]

Anything else to change to make it work?


#12

This is correct, on the console just select “Hey Snips” instead of personal wakeword, train and download your assistant. Make the changes in snips.toml and sudo systemctl restart snips-*


#13

I don’t know if this matters, but I get:

pi@raspberrypi:~ $ sudo systemctl restart snips-*
Failed to restart snips-record-personal-hotword.service: Unit snips-record-personal-hotword.service not found.

I then tried to disable this service:

pi@raspberrypi:~ $ sudo systemctl disable snips-record-personal-hotword
Failed to disable unit: No such file or directory

I checked the directory /etc/systemd/system but there was not a single snips-*.target.wants file or snips-*.service

I then checked /lib/systemd/system where the following services are listed:

snips-analytics.service
snips-asr.service
snips-audio-server.service
snips-dialogue.service
snips-hotword.service
snips-nlu.service
snips-skill-server.service

But not the record service.
Why does systemctl thinks the snips-record-personal-hotword service should be restarted?


#14

So after changing to hey snips and uncommenting the model line in the snips.toml neither “hey snips” nor my personal hotword is detected.

If I comment the model line out and restart the snips “hey snips” is detected properly (but of course not my personal hotword)


#15

so it’s a problem loading the personal wakeword. Start by checking that the directory is at the correct place, or at least that is is where you config line points. Maybe also rename the directory into something more natural than the timestamp. Name it, dunno, the wakeword itself.

Check the json file that comes with, paste it on pastebin or whatever for me to check it. I never use that snips record personal thingy, the respeaker mics are too bad, so I record my own sound files, trim them and do it manually. My personal wakewords are placed directly in /home/pi/ProjectAlice/hotwords. Makes it easier to manage


#16

https://pastebin.com/xnA6Xt7T

I find it strange that before the update to 0.60.8 the recognition worked well. The wav files sound very clear, I double checked the folder structure (as seen in post #8).

Just to be sure, if I use a falsy path, I got an error

[21:33:11.353782] INFO :snips_hotword::server       : Using model from /etc/snips/personal_brauni2
[21:33:11.354138] ERROR:snips_hotword               : No such file or directory (os error 2)

[21:33:11.354215] DEBUG:rumqtt::client              : snips-hotword|4817-raspberrypi-1: Entering normal operation loop

But my logs appear to look good:

[21:37:04.018285] INFO :snips_hotword::server       : Using model from /etc/snips/personal_brauni
[21:37:04.176901] DEBUG:snips_hotword_lib           : attempt to start detector for default and hey_brauni
[21:37:04.177176] INFO :snips_hotword_lib::audio    : Audio thread for default started
[21:37:04.177655] INFO :snips_hotword_lib::audio    : Net and VAD thread for site default started (vad inhibitor: true, vad messages: false
[21:37:04.181671] INFO :snips_hotword_lib           : Detector "detector.hey_brauni.default", sensitivity: 0.5, threshold 0.5
[21:37:04.182493] INFO :snips_hotword_lib           : detector.hey_brauni.default thread started

Actually the same like the working “hey snips”:

[06:50:54.585463] INFO :snips_hotword_lib::universal: Loading model "/usr/share/snips/assistant/custom_hotword", hotword_key: Some("hey_snips"), model_id: Some("hey_snips_3.1_2018-04-13T15:27:35_model_0019")
[06:50:54.996472] DEBUG:snips_hotword_lib           : attempt to start detector for default and hey_snips
[06:50:54.997045] INFO :snips_hotword_lib::audio    : Net and VAD thread for site default started (vad inhibitor: true, vad messages: false
[06:50:55.011054] INFO :snips_hotword_lib           : Detector "detector.hey_snips.default", sensitivity: 0.5, threshold 0.236
[06:50:55.012530] INFO :snips_hotword_lib           : detector.hey_snips.default thread started

#17

Yeah, it’s weird… Di you try this? https://docs.snips.ai/guides/advanced-configuration/wakeword/personal-wakeword#4-test-your-model-and-adjust-its-sensitivity


#18

Guess I’ll have to give up for now.

I tried various values ranging from 0.3 to 0.7. Before the update 0.5 worked out of the box.

I compared the stats of the personal model to the hey snips model, but everything is identical (owner, permissions).

I wanted to exchange the wav files but then I saw that the hey snips model does not have wav files…

So only idea left would be a downgrade to 0.60.1. How can I achieve this?

Is there a way to completely reinstall snips? Sam init doesn’t help.


#19

Tried again various times with sam setup audio; sam init; recording new wakewords and 0.60.10
All i can say is, that the snips_hotword clearly detects voice/noise and then displays this (when its quiet no frames are replayed), but my hotword isn’t detected.

[21:16:48.934836] DEBUG:snips_hotword_lib::audio      : Audio thread for site default replayed 24 frames from history
[21:16:49.476409] DEBUG:snips_hotword_lib::features   : Clear feature states
[21:16:51.815029] DEBUG:snips_hotword_lib::audio      : Audio thread for site default replayed 24 frames from history
[21:16:52.935192] DEBUG:snips_hotword_lib::features   : Clear feature states

with the working default hey_snips model it looks like this:

[21:15:44.684868] DEBUG:snips_hotword_lib::audio                     : Audio thread for site default replayed 24 frames from history
[21:15:45.228378] DEBUG:snips_hotword_lib::features                  : Clear feature states
[21:15:45.315312] INFO :snips_hotword_hermes                         : Hotword detected: site_id:default model:hey_snips (322ms ago)
[21:15:45.315560] DEBUG:snips_hotword_lib::universal::tf             : Clear network state
[21:15:45.315638] DEBUG:snips_hotword_lib::universal::post_processing: Clear post processor
[21:15:45.414741] DEBUG:snips_hotword_lib::features                  : Clear feature states
[21:15:45.414854] INFO :snips_hotword_lib::audio                     : Audio thread for site default stopped.
[21:15:45.414926] DEBUG:snips_hotword_lib::universal::tf             : Clear network state
[21:15:45.414995] DEBUG:snips_hotword_lib::universal::post_processing: Clear post processor

Could anyone share a working personal_hotword config + directory, which i could test?


#20

Did you get this sorted? I have a similar problem and it is driving me mad.
The assistant I installed works fine with the default wake word i.e. comment out any wake word directory in snips.toml and restart snips.
If I do a status everything working and snips responds to ‘Hey snips’
However if I use my own wake word which works fine using the command line test the snips hotword service wont start if I put the path to the model directory in the snips.toml file.
In your case if you uncomment your wake word directory and restart snips do you see the hotword service running (via status in Sam or viewing syslog after startup?