synesthesiam / rhasspy

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

Cannot train on Raspberry 3b (stretch): Command failed: ngramcount #139

Closed timaschew closed 4 years ago

timaschew commented 4 years ago

I've installed Rhasspy via virtual-env and training doesn't work.
Running docker on the same device works fine.

INFO:__main__:Starting training
DEBUG:DialogueManager:asleep -> training_sentences
DEBUG:SnowboyWakeListener:listening -> loaded
[2020-01-04 16:09:01,705] 192.168.178.21:58777 GET /api/unknown-words 1.1 200 2 28056
INFO:quart.serving:192.168.178.21:58777 GET /api/unknown-words 1.1 200 2 28056
WARNING:train:Unsupported acoustic model type: remote
DEBUG:train:Parsing ini file(s): ['/home/pi/rhasspy/profiles/en/sentences.ini']
DEBUG:rhasspynlu.ini_jsgf:Loaded ini file
.  ini_graph
.  intent_fst
.  language_model:intent_counts
ngramcount: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.27' not found (required by ngramcount)
ngramcount: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.27' not found (required by /home/pi/rhasspy/.venv/lib/libngram.so.134)
TaskFailed - taskid:language_model:intent_counts
Command failed: 'ngramcount /home/pi/.config/rhasspy/profiles/en/intent.fst /home/pi/.config/rhasspy/profiles/en/intent.fst.counts' returned 1

########################################
language_model:intent_counts <stdout>:

DEBUG:DialogueManager:training_sentences -> ready
INFO:DialogueManager:Automatically listening for wake word
DEBUG:DialogueManager:ready -> asleep
DEBUG:SnowboyWakeListener:loaded -> listening
ERROR:__main__:Training failed: <Task: language_model:intent_counts>: TaskFailed
Command failed: 'ngramcount /home/pi/.config/rhasspy/profiles/en/intent.fst /home/pi/.config/rhasspy/profiles/en/intent.fst.counts' returned 1
Traceback (most recent call last):
  File "/home/pi/rhasspy/.venv/lib/python3.6/site-packages/quart/app.py", line 1471, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/home/pi/rhasspy/.venv/lib/python3.6/site-packages/quart/app.py", line 1519, in dispatch_request
    return await handler(**request_.view_args)
  File "app.py", line 574, in api_train
    raise Exception(f"Training failed: {result.reason}")
Exception: Training failed: <Task: language_model:intent_counts>: TaskFailed
Command failed: 'ngramcount /home/pi/.config/rhasspy/profiles/en/intent.fst /home/pi/.config/rhasspy/profiles/en/intent.fst.counts' returned 1
synesthesiam commented 4 years ago

This is very odd to me. The binaries for opengrm are built on Debian stretch (GLIBC 2.24), so they should be forward compatible with 2.27, right?

timaschew commented 4 years ago

I'm not sure, I can just tell you what's installed on the raspberry:

$ ldd --version
ldd (Debian GLIBC 2.24-11+deb9u3) 2.24
Copyright © 2016 Free Software Foundation, Inc.
timaschew commented 4 years ago

I've installed buster on a new sd card and now it works.

gericho commented 4 years ago

Training failed: : TaskError Command error: 'ngramprint --ARPA /home/pi/.config/rhasspy/profiles/it/intent.fst.model > /home/pi/.config/rhasspy/profiles/it/language_model.txt' returned 139

Clean install on Raspbian buster

synesthesiam commented 4 years ago

Were there any other errors in the log? If it made it that far (to ngramprint), it's not the same issue as @timaschew was having.

gericho commented 4 years ago

deleted the rhasspy directory and reinstalled everything did the job

synesthesiam commented 4 years ago

I will be removing the dependency on opengrm in the next version of Rhasspy, so I'm hoping to have fewer of these errors :)

voipep commented 4 years ago

Hi there, I have the same setup and get the same error, but a reinstall didn't help :/ Any suggestions? Would be highly appreciated