snipsco / snips-issues

Feel free to share your bugs with us.
14 stars 5 forks source link

[Platform][Satellite] snips-satellite cannot capture personal hotword and does not restart after changing sensitivity #143

Closed Psychokiller1888 closed 5 years ago

Psychokiller1888 commented 5 years ago

What's the issue? Just installed snips-satellite on my satellites. Beside it being unable to capture my hotwords, I started to think it's about the sensitivity. Edited snips.toml, changed a sensitivity setting, and did systemctl restart snips-* Doing this fails and snips-satellite cannot restart until next reboot.... Pretty hard to set the correct sensitivity and or manage snips that way

Logs

ALSA lib pcm_equal.c:196:(_snd_pcm_equal_open) No slave configuration for equal pcm
[12:45:33.297700] DEBUG:snips_audio_portaudio: Attempt 1
[12:45:33.399405] DEBUG:snips_audio_portaudio: Attempt 2
[12:45:33.499830] DEBUG:snips_audio_portaudio: Attempt 3
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
[12:45:33.600249] DEBUG:snips_audio_portaudio: Attempt 4
[12:45:33.701325] DEBUG:snips_audio_portaudio: Attempt 5
[12:45:33.801754] DEBUG:snips_audio_portaudio: Attempt 6
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
[12:45:33.902177] DEBUG:snips_audio_portaudio: Attempt 7
[12:45:34.003289] DEBUG:snips_audio_portaudio: Attempt 8
[12:45:34.103767] DEBUG:snips_audio_portaudio: Attempt 9
[12:45:34.170954] DEBUG:snips_audio_portaudio: Portaudio: Ok("PortAudio V19-devel (built May  9 2019 13:17:19)")
[12:45:34.173122] DEBUG:snips_audio_portaudio: Looking for default input device
[12:45:34.175421] INFO :snips_audio_portaudio: Use input device: "default"
[12:45:34.178031] DEBUG:snips_audio_portaudio: Start capture: InputSettings { params: Parameters { device: Index(DeviceIndex(5)), channel_count: 1, suggested_latency: 0.005804988662131519, is_interleaved: true, sample_format: PhantomData }, sample_rate: 16000.0, frames_per_buffer: 256, flags:  }
[12:45:34.204219] DEBUG:snips_audio_portaudio: Attempt 10
[12:45:34.305412] DEBUG:snips_audio_portaudio: Attempt 11
[12:45:34.405895] DEBUG:snips_audio_portaudio: Attempt 12
[12:45:34.470725] DEBUG:snips_audio_portaudio: start capture loop
[12:45:34.506485] DEBUG:snips_audio_portaudio: Attempt 13
[12:45:34.507551] DEBUG:snips_audio_portaudio: Mike initialization looking good
[12:45:34.510024] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(1), topics: [SubscribeTopic { topic_path: "hermes/dialogueManager/sessionStarted", qos: AtMostOnce }] })
[12:45:34.510874] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(2), topics: [SubscribeTopic { topic_path: "hermes/dialogueManager/sessionEnded", qos: AtMostOnce }] })
[12:45:34.514087] DEBUG:rumqtt::connection   : snips-satellite|1074-aliceoffice-1 Received control message Suback(Suback { pid: PacketIdentifier(1), return_codes: [Success(AtMostOnce)] })
[12:45:34.512807] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.hotword_id -> Ok(None)
[12:45:34.515595] DEBUG:snips_common_cli::cli: conf lookup: snips-common.hotword_id -> Ok(None)
[12:45:34.518842] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.no_vad_inhibitor -> Ok(None)
[12:45:34.520154] DEBUG:snips_common_cli::cli: conf lookup: snips-common.no_vad_inhibitor -> Ok(None)
[12:45:34.517337] DEBUG:rumqtt::connection   : snips-satellite|1074-aliceoffice-1 Received control message Suback(Suback { pid: PacketIdentifier(2), return_codes: [Success(AtMostOnce)] })
[12:45:34.521909] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(3), topics: [SubscribeTopic { topic_path: "hermes/hotword/toggleOn", qos: AtMostOnce }] })
[12:45:34.522708] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(4), topics: [SubscribeTopic { topic_path: "hermes/hotword/toggleOff", qos: AtMostOnce }] })
[12:45:34.523761] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.vad_messages -> Ok(None)
[12:45:34.525438] DEBUG:snips_common_cli::cli: conf lookup: snips-common.vad_messages -> Ok(None)
[12:45:34.528081] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.sensitivity -> Ok(None)
[12:45:34.528434] DEBUG:snips_common_cli::cli: conf lookup: snips-common.sensitivity -> Ok(None)
[12:45:34.527635] DEBUG:rumqtt::connection   : snips-satellite|1074-aliceoffice-1 Received control message Suback(Suback { pid: PacketIdentifier(3), return_codes: [Success(AtMostOnce)] })
[12:45:34.531023] DEBUG:rumqtt::connection   : snips-satellite|1074-aliceoffice-1 Received control message Suback(Suback { pid: PacketIdentifier(4), return_codes: [Success(AtMostOnce)] })
[12:45:34.531959] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.model -> Ok(Some(["/home/pi/ProjectAlice/hotwords/laurent=0.75", "/home/pi/ProjectAlice/hotwords/natalija=0.52", "/home/pi/ProjectAlice/hotwords/thanks=0.55", "/home/pi/ProjectAlice/assistant/custom_hotword=0.53"]))
[12:45:35.214886] ERROR:rumqtt::client       : snips-satellite|1074-aliceoffice-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
[12:45:35.215881] DEBUG:rumqtt::client       : snips-satellite|1074-aliceoffice-1: Entering reconnecting loop
[12:45:35.216785] INFO :rumqtt::client       : not seeking reconnection
[12:45:35.217366] INFO :rumqtt::client       : client thread done
[12:45:35.217589] ERROR:snips_common_cli::cli: Unable to reconnect to the mqtt broker, ending the program.
gisteren commented 5 years ago

Hello,

I am seeing the exact same issue on two installs.

both systems were working instances with the audio and hotword service running on it. I have installed the satellite package and after that I deinstalled the hotword and audio server pacages.

Regards,

Richard

[11:46:14.318333] DEBUG:snips_audio_portaudio: Mike initialization looking good
[11:46:14.318821] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(1), topics: [SubscribeTopic { topic_path: "hermes/dialogueManager/sessionStarted", qos: AtMostOnce }] })
[11:46:14.318992] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.hotword_id -> Ok(None)
[11:46:14.319098] DEBUG:snips_common_cli::cli: conf lookup: snips-common.hotword_id -> Ok(None)
[11:46:14.319112] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(2), topics: [SubscribeTopic { topic_path: "hermes/dialogueManager/sessionEnded", qos: AtMostOnce }] })
[11:46:14.319273] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(3), topics: [SubscribeTopic { topic_path: "hermes/hotword/toggleOn", qos: AtMostOnce }] })
[11:46:14.319325] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.no_vad_inhibitor -> Ok(None)
[11:46:14.319375] DEBUG:rumqtt::connection   : Send: Subscribe(Subscribe { pid: PacketIdentifier(4), topics: [SubscribeTopic { topic_path: "hermes/hotword/toggleOff", qos: AtMostOnce }] })
[11:46:14.319410] DEBUG:snips_common_cli::cli: conf lookup: snips-common.no_vad_inhibitor -> Ok(None)
[11:46:14.319587] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.vad_messages -> Ok(None)
[11:46:14.319666] DEBUG:snips_common_cli::cli: conf lookup: snips-common.vad_messages -> Ok(None)
[11:46:14.319748] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.sensitivity -> Ok(None)
[11:46:14.319820] DEBUG:snips_common_cli::cli: conf lookup: snips-common.sensitivity -> Ok(None)
[11:46:14.319946] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.model -> Ok(Some("/usr/share/snips/hotword"))
[11:46:14.320133] ERROR:rumqtt::client       : snips-satellite|7555-gohan-snips-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
[11:46:14.320145] ERROR:snips_satellite      : No such file or directory (os error 2)

[11:46:14.320207] DEBUG:rumqtt::client       : snips-satellite|7555-gohan-snips-1: Entering reconnecting loop
[11:46:14.320380] INFO :rumqtt::client       : not seeking reconnection
[11:46:14.320431] INFO :rumqtt::client       : client thread done
[11:46:14.320491] ERROR:snips_common_cli::cli: Unable to reconnect to the mqtt broker, ending the program.
cpoisson commented 5 years ago

@gisteren,

Looks like another issue, check the path to your hotword model.

[11:46:14.319946] DEBUG:snips_common_cli::cli: conf lookup: snips-hotword.model -> Ok(Some("/usr/share/snips/hotword"))
[11:46:14.320133] ERROR:rumqtt::client       : snips-satellite|7555-gohan-snips-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
[11:46:14.320145] ERROR:snips_satellite      : No such file or directory (os error 2)

The log related to MQTT are misleading (we need to fix that)

[edit]

Try to install an assistant on your satellite or just install hey snips model package

sudo apt install snips-hotword-model-heysnipsv4

at least it will provide a hotword in /usr/share/snips/hotword

cpoisson commented 5 years ago

@Psychokiller1888

We are trying to reproduce your issue (without success of course)

Quick question, what happens if you only restart the snips-satellite service (sudo systemctl restart snips-satellite) ?

What is the output of journalctl -u snips-satellite -f?

cpoisson commented 5 years ago

@Psychokiller1888,

Did you manage to solve your issue?

cpoisson commented 5 years ago

Closing this one, seems fixed