rhasspy / rhasspy-wake-snowboy-hermes

MQTT service for wake word detection with snowboy using Hermes protocol
MIT License
1 stars 3 forks source link

IndexError: list index out of range #1

Closed hawkeye217 closed 3 years ago

hawkeye217 commented 4 years ago

I'm using Rhasspy 2.5-pre in a Docker container on a Pi Zero satellite with Snowboy as the wakeword. I've been seeing this error come up a few times after a wakeword:

[DEBUG:2020-04-27 12:29:20,530] rhasspywake_snowboy_hermes: Wake word detected: computer_activate (site_id=musicpi4)
[ERROR:2020-04-27 12:29:20,599] rhasspywake_snowboy_hermes: detection_thread_proc
Traceback (most recent call last):
  File "/usr/lib/rhasspy-voltron/rhasspy-wake-snowboy-hermes/rhasspywake_snowboy_hermes/__init__.py", line 253, in detection_thread_proc
    detector_index
IndexError: list index out of range
[DEBUG:2020-04-27 12:29:20,671] rhasspywake_snowboy_hermes: -> HotwordDetected(model_id='computer_activate', model_version='', model_type='personal', current_sensitivity=0.55, site_id='musicpi4', session_id=None, send_audio_captured=None)
[DEBUG:2020-04-27 12:29:20,693] rhasspywake_snowboy_hermes: Publishing 173 bytes(s) to hermes/hotword/computer_activate/detected

After this occurs, I have to restart Rhasspy to get it to detect the wakeword again. Any ideas?

synesthesiam commented 4 years ago

Do you have multiple wake words enabled? Or a wake word with multiple parts?

Either way, I'll add a check so it won't crash the whole service.

hawkeye217 commented 4 years ago

No, I only have one wakeword enabled - a custom snowboy model. I noticed I received that message once after snowboy had segfaulted. The supervisor process restarted it, but then upon the next wake I noticed that error message, and Rhasspy became unresponsive to any other wakewords after that point. Hope that helps.

0uro commented 3 years ago

Similar issue here. My setup:

After saying the wakeword it spits this out : [ERROR:2020-10-04 10:23:19,698] rhasspywake_snowboy_hermes: handle_detection Traceback (most recent call last): File "/home/pi/new_rhasspy/rhasspy-wake-snowboy-hermes/rhasspywake_snowboy_hermes/init.py", line 159, in handle_detection current_sensitivity=self.models[model_index].float_sensitivity(), IndexError: list index out of range

For what I've noticed, the model_index increments even though there is only one given as argument.

As an ugly temporary fix I've edited line 159 to manually set the sensitivity

There is also no way to provide a command line sensitivity argument, maybe could it be given like the udp-audio setting: --models model1.pdml <model 1 sensitivity> model2.pdml <model 2 senitivity> ... Or maybe force people to embed it in the names ? like model1-0.4.pmdl

EDIT : My bad, I was a bit fast, that thing is already handled --model MODEL [MODEL ...] Snowboy model settings (model, sensitivity, audio_gain, apply_frontend)

synesthesiam commented 3 years ago

I've added an extra check in 8cc1991b36f63567840a0aa620cb0adc738bf13c This will be rolled into 2.5.7