synesthesiam / rhasspy

Rhasspy voice assistant for offline home automation
https://rhasspy.readthedocs.io
MIT License
942 stars 101 forks source link

Where to start debugging or rather use voice2json #204

Closed RidaAyed closed 4 years ago

RidaAyed commented 4 years ago

I've added rhasspy via as hassio addon, opened the webui and clicked train.

The rhasspy addon log displays:

ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM dmix
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_pcm_pulse.so
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_pcm_pulse.so
[2020-04-17 11:14:08,519] 192.168.167.22:41594 GET /api/profiles 1.1 200 153 44968
ERROR:DialogueManager:get_microphones
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 782, in handle_forward
    mics = recorder_class.get_microphones()
  File "/usr/share/rhasspy/rhasspy/audio_recorder.py", line 261, in get_microphones
    default_name = audio.get_default_input_device_info().get("name")
  File "/usr/local/lib/python3.6/dist-packages/pyaudio.py", line 949, in get_default_input_device_info
    device_index = pa.get_default_input_device()
OSError: No Default Input Device Available
INFO:quart.serving:192.168.167.22:41594 GET /api/profiles 1.1 200 153 44968
[2020-04-17 11:14:08,568] 192.168.167.22:41602 GET /api/profile 1.1 200 6907 56274
INFO:quart.serving:192.168.167.22:41602 GET /api/profile 1.1 200 6907 56274
DEBUG:InboxActor: -> stopped
[2020-04-17 11:14:08,590] 192.168.167.22:41604 GET /api/microphones 1.1 200 2 277507
INFO:quart.serving:192.168.167.22:41604 GET /api/microphones 1.1 200 2 277507
[2020-04-17 11:14:08,597] 192.168.167.22:41594 GET /api/unknown-words 1.1 200 2 21041
INFO:quart.serving:192.168.167.22:41594 GET /api/unknown-words 1.1 200 2 21041
DEBUG:InboxActor: -> stopped
DEBUG:InboxActor: -> stopped
[2020-04-17 11:14:08,622] 192.168.167.22:41600 GET /api/custom-words 1.1 200 19 78139
INFO:quart.serving:192.168.167.22:41600 GET /api/custom-words 1.1 200 19 78139
[2020-04-17 11:14:08,626] 192.168.167.22:41602 GET /api/problems 1.1 200 289 38491
INFO:quart.serving:192.168.167.22:41602 GET /api/problems 1.1 200 289 38491
[2020-04-17 11:14:08,628] 192.168.167.22:41596 GET /api/speakers 1.1 200 77 315054
INFO:quart.serving:192.168.167.22:41596 GET /api/speakers 1.1 200 77 315054
INFO:__main__:Starting training
DEBUG:DialogueManager:asleep -> training_sentences
[2020-04-17 11:14:12,779] 192.168.167.22:41602 GET /api/unknown-words 1.1 200 2 16918
INFO:quart.serving:192.168.167.22:41602 GET /api/unknown-words 1.1 200 2 16918
DEBUG:train:Parsing ini file(s): ['/usr/share/rhasspy/profiles/en/sentences.ini']
DEBUG:rhasspynlu.ini_jsgf:Loaded ini file
DEBUG:vocab_dict:Forcing lower-case
DEBUG:vocab_dict:Loading dictionary from /share/rhasspy/profiles/en/base_dictionary.txt
DEBUG:vocab_dict:Loaded 30 word(s) from /share/rhasspy/profiles/en/vocab.txt
DEBUG:DialogueManager:training_sentences -> training_intent
INFO:DialogueManager:Training complete
DEBUG:DialogueManager:Reloading actors
DEBUG:PorcupineWakeListener:started -> stopped
DEBUG:PorcupineWakeListener:stopped -> stopped
DEBUG:PocketsphinxDecoder:loaded -> stopped
DEBUG:PocketsphinxDecoder:stopped -> stopped
DEBUG:FsticuffsRecognizer:loaded -> stopped
DEBUG:FsticuffsRecognizer:stopped -> stopped
DEBUG:DialogueManager:training_intent -> training_loading
DEBUG:PorcupineWakeListener: -> started
DEBUG:PocketsphinxDecoder: -> started
DEBUG:FsticuffsRecognizer: -> started
ERROR:PorcupineWakeListener:loading wake handle
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/wake.py", line 844, in to_started
    self.load_handle()
  File "/usr/share/rhasspy/rhasspy/wake.py", line 936, in load_handle
    sensitivities=self.sensitivities,
  File "/usr/share/rhasspy/porcupine.py", line 117, in __init__
    raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]('initialization failed')
OSError: initialization failed
DEBUG:PocketsphinxDecoder:Loading decoder with hmm=/share/rhasspy/profiles/en/acoustic_model, dict=/share/rhasspy/profiles/en/dictionary.txt, lm=/share/rhasspy/profiles/en/language_model.txt
DEBUG:FsticuffsRecognizer:Using stop words at /usr/share/rhasspy/profiles/en/stop_words.txt
DEBUG:FsticuffsRecognizer:started -> loaded
DEBUG:PocketsphinxDecoder:started -> loaded
INFO:DialogueManager:Actors reloaded
DEBUG:DialogueManager:training_loading -> ready
INFO:DialogueManager:Automatically listening for wake word
DEBUG:DialogueManager:ready -> asleep
DEBUG:InboxActor: -> stopped
.  ini_graph
.  intent_fst
.  language_model:intent_counts
.  language_model:intent_model
.  language_model:intent_arpa
.  vocab
.  vocab_dict
[2020-04-17 11:14:29,979] 192.168.167.22:41600 POST /api/train 1.1 200 37 17225927
ERROR:PorcupineWakeListener:loading wake handle
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/wake.py", line 852, in in_started
    self.load_handle()
  File "/usr/share/rhasspy/rhasspy/wake.py", line 936, in load_handle
    sensitivities=self.sensitivities,
  File "/usr/share/rhasspy/porcupine.py", line 117, in __init__
    raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]('initialization failed')
OSError: initialization failed
INFO:quart.serving:192.168.167.22:41600 POST /api/train 1.1 200 37 17225927
DEBUG:InboxActor: -> stopped
INFO:quart.serving:192.168.167.22:41600 GET /api/problems 1.1 200 289 9807
[2020-04-17 11:14:30,052] 192.168.167.22:41600 GET /api/problems 1.1 200 289 9807

I prefer the console and thus would gladly switch to voice2json if that helps

synesthesiam commented 4 years ago

Try the latest 2.4.20.1 release and see if that helps you. voice2json is a bit out of date, but I'll be bringing it up to speed with Rhasspy 2.5 in the coming weeks.

RidaAyed commented 4 years ago

I've installed the latest version 2.4.20.2

Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/wake.py", line 844, in to_started
    self.load_handle()
  File "/usr/share/rhasspy/rhasspy/wake.py", line 937, in load_handle
    sensitivities=self.sensitivities,
  File "/usr/share/rhasspy/porcupine.py", line 117, in __init__
    raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]('initialization failed')
OSError: initialization failed
synesthesiam commented 4 years ago

Please consider upgrading to Rhasspy 2.5, which now includes Porcupine 1.8