Snips.ai - where to put assistant.zip

Hi all,

I have a Rasp3 with hassio and snips installed. But the problem is it looks like config of mic and speaker are ok, snips in on standby but no hotword is detected.

Installed usb mic and speaker in jack:
core-ssh:/proc/asound# cat cards
0 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA
1 [Device ]: USB-Audio - USB PnP Sound Device
C-Media Electronics Inc. USB PnP Sound Device at usb-3f980000.usb-1.2, full spe

And Snips Config:
{
“mqtt_bridge”: {
“active”: true,
“host”: “core-mosquitto”,
“port”: 1883,
“user”: “”,
“password”: “”
},
“mic”: “1,0”,
“speaker”: “0,0”,
“assistant”: “assistant.zip”
}

And configuration.yaml is done:

Voice control

snips:

Snips looks to start OK:

[INFO] Show audio output device
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
[INFO] Show audio input device
**** List of CAPTURE Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
[INFO] Setup audio device
[INFO] Using default asound.conf
[DEBUG] Using /root/.asoundrc
pcm.!default {
type asym
capture.pcm “mic”
playback.pcm “speaker”
}
pcm.mic {
type plug
slave {
pcm “hw:1,0”
}
}
pcm.speaker {
type plug
slave {
pcm “hw:0,0”
}
}
[INFO] Checking for /share/snips.toml
[INFO] Setup internal mqtt bridge
[INFO] Start internal mqtt broker
[INFO] Checking for updated assistant.zip in /share
[INFO] Using default snips assistant
Archive: /assistant-default.zip
inflating: /usr/share/snips/assistant/assistant.json
1521292972: Warning: Mosquitto should not be run as root/administrator.
inflating: /usr/share/snips/assistant/trained_assistant.json 1521292972: mosquitto version 1.3.4 (build date 2017-05-29 22:25:09+0000) starting
1521292972: Config loaded from /etc/mosquitto.conf.
1521292972: Opening ipv4 listen socket on port 1883.
1521292972: Opening ipv6 listen socket on port 1883.
1521292972: Connecting bridge main-mqtt (core-mosquitto:1883)
inflating: /usr/share/snips/assistant/custom_asr/b.snips
inflating: /usr/share/snips/assistant/custom_asr/w.snips

And after that:
1521292976: New client connected from 127.0.0.1 as mqttc_1840830125 (c1, k5).
INFO:rumqtt::connection: $$$ Connected to broker
INFO:hermes_mqtt: Connecting to MQTT broker at address localhost:1883
1521292976: New connection from 127.0.0.1 on port 1883.
1521292976: New client connected from 127.0.0.1 as mqttc_3967104047 (c1, k5).
INFO:rumqtt::connection: $$$ Connected to broker
INFO:snips_analytics_hermes: Idle
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.front.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
INFO:queries_hermes : loading model at path “/usr/share/snips/assistant”
INFO:snips_asr: Using model from /usr/share/snips/assistant/custom_asr
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.surround51.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.surround51.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.surround40.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.surround51.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.surround51.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.surround51.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.surround71.0:CARD=0’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2’
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
INFO:snips_audio_portaudio: Use input device: “default”
1521292976: New connection from 127.0.0.1 on port 1883.
1521292976: New client connected from 127.0.0.1 as mqttc_1169958097 (c1, k5).
[14:22:56] Watching on localhost:1883
INFO:snips_hotword: Using model from /usr/share/snips/assistant/custom_hotword
INFO:hermes_mqtt : Connecting to MQTT broker at address localhost:1883
1521292976: New connection from 127.0.0.1 on port 1883.
1521292976: New client connected from 127.0.0.1 as mqttc_2509723352 (c1, k5).
INFO:rumqtt::connection: $$$ Connected to broker
INFO:hermes_mqtt : Connecting to MQTT broker at address localhost:1883
1521292976: New connection from 127.0.0.1 on port 1883.
1521292976: New client connected from 127.0.0.1 as mqttc_3943655064 (c1, k5).
INFO:rumqtt::connection: $$$ Connected to broker
INFO:snips_hotword : Connecting using MQTT site-id default
2018-03-17 14:22:57,611 INFO success: snips-tts entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-17 14:22:57,611 INFO success: snips-dialogue entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-17 14:22:57,620 INFO success: snips-asr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-17 14:22:57,620 INFO success: snips-analytics entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-17 14:22:57,621 INFO success: snips-hotword entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-17 14:22:57,621 INFO success: snips-audio-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-17 14:22:57,622 INFO success: snips-queries entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO:queries_hermes : model loaded in 2117 ms
snips_stt --use-energy=false --num-mel-bins=40 --num-ceps=40 --low-freq=20 --high-freq=-400 --sample-frequency=16000
INFO:hermes_mqtt: Connecting to MQTT broker at address localhost:1883
1521292978: New connection from 127.0.0.1 on port 1883.
1521292978: New client connected from 127.0.0.1 as mqttc_4042427449 (c1, k5).
INFO:rumqtt::connection: $$$ Connected to broker
INFO:hermes_mqtt : Connecting to MQTT broker at address localhost:1883
1521292978: New connection from 127.0.0.1 on port 1883.
1521292978: New client connected from 127.0.0.1 as mqttc_1312606471 (c1, k5).
INFO:rumqtt::connection: $$$ Connected to broker
INFO:snips_asr : Connecting using MQTT site-id default
INFO:snips_asr_hermes : Preparing decoder
INFO:snips_asr_hermes : Idle

And now Snips is Idle and doesnt detect any hotword. Hotword is standard.

Any ideas?

Thanks,
FF

same for me.

OK, so if I do not put any assistant.zip in, then it detects the hotword.
But I built my assistant.zip on snips.io and would like to use it.

So the question is, where exactly, in which folder is it needed so the snips.io addon of hass.io finds it?
https://home-assistant.io/addons/snips/ it only says copy it over.

Would it then unpack and install it by itself?
Or maybe is this step only possible before the first start of the freshly installed snips.io addon in hass.io?

Thanks,
FF

I believe you need to unpack the zip, and then copy it over to /usr/share/snips/assistant
i.e. in that directory, there should then be a assistant.json training_assistant.json and three sub directories (custom_asr, custom_dialogue and custom_hotword)

I am not sure if there is another way with the plug-in doing some of this, but at least this seems to have worked for me.

Hi,

If you have hass.io, on your computer you explore the share directorycof your home assistant and put the asssistant.zip file in it.

Then restart snips and you should have few seconds later a trace that say inflating assistant.zip in /usr…

And then may be, you’ll have the same issue i have with a version problem for nluEngine :frowning: