Training dutch in 2.5.6

Hi there,

I’m setting up Rhasspy in a master / slave configuration using the HASSIO Addon as master on my server and a Pi Zero as a satellite.

Everything seem to be working, I can record, I can get audio back, however when trying to train my profile I get the error below. However, training an English profile works fine.

I tried deleting my profile and redownoading the neccessary files without success.
Maybe related to 2.5.6 since I could train my profile fine on another Pi using an older version.

[DEBUG:2020-10-14 15:08:45,598] rhasspyasr_kaldi.train: [‘bash’, ‘/usr/lib/rhasspy/.venv/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/lang’]
/usr/lib/rhasspy/.venv/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh /share/rhasspy/profiles/nl/kaldi/model/data/local/dict /share/rhasspy/profiles/nl/kaldi/model/data/local/lang /share/rhasspy/profiles/nl/kaldi/model/data/lang
Checking /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/silence_phones.txt …
–> reading /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/silence_phones.txt
–> text seems to be UTF-8 or ASCII, checking whitespaces
–> text contains only allowed whitespaces
–> /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/silence_phones.txt is OK
Checking /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/optional_silence.txt …
–> reading /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/optional_silence.txt
–> text seems to be UTF-8 or ASCII, checking whitespaces
–> text contains only allowed whitespaces
–> /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/optional_silence.txt is OK
Checking /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/nonsilence_phones.txt …
–> reading /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/nonsilence_phones.txt
–> text seems to be UTF-8 or ASCII, checking whitespaces
–> text contains only allowed whitespaces
–> /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/nonsilence_phones.txt is OK
Checking disjoint: silence_phones.txt, nonsilence_phones.txt
–> disjoint property is OK.
Checking /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/lexicon.txt
–> reading /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/lexicon.txt
–> text seems to be UTF-8 or ASCII, checking whitespaces
–> text contains only allowed whitespaces
–> ERROR: phone “SPN” is not in {, non}silence.txt (line 4)
Checking /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/extra_questions.txt …
–> /share/rhasspy/profiles/nl/kaldi/model/data/local/dict/extra_questions.txt is empty (this is OK)
–> ERROR validating dictionary directory /share/rhasspy/profiles/nl/kaldi/model/data/local/dict (see detailed error messages above)
Error validating directory /share/rhasspy/profiles/nl/kaldi/model/data/local/dict
[ERROR:2020-10-14 15:08:45,638] rhasspyasr_kaldi_hermes: train
Traceback (most recent call last):
File “/usr/lib/rhasspy/rhasspy-asr-kaldi-hermes/rhasspyasr_kaldi_hermes/init.py”, line 565, in handle_train
mixed_language_model_fst=self.mixed_language_model_fst,
File “/usr/lib/rhasspy/rhasspy-asr-kaldi/rhasspyasr_kaldi/train.py”, line 162, in train
language_model_type=language_model_type,
File “/usr/lib/rhasspy/rhasspy-asr-kaldi/rhasspyasr_kaldi/train.py”, line 327, in train_kaldi
subprocess.check_call(prepare_lang, cwd=model_dir, env=extended_env)
File “/usr/lib/python3.7/subprocess.py”, line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘bash’, ‘/usr/lib/rhasspy/.venv/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/lang’]’ returned non-zero exit status 1.
[DEBUG:2020-10-14 15:08:45,641] rhasspyasr_kaldi_hermes: -> AsrError(error=“Command ‘[‘bash’, ‘/usr/lib/rhasspy/.venv/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/lang’]’ returned non-zero exit status 1.”, site_id=‘master’, context=None, session_id=‘7c3cf098-f7d6-4af5-b4fe-7ac0e632f94d’)
[DEBUG:2020-10-14 15:08:45,641] rhasspyasr_kaldi_hermes: Publishing 400 bytes(s) to hermes/error/asr
[DEBUG:2020-10-14 15:08:45,653] rhasspyserver_hermes: Handling AsrError (topic=hermes/error/asr, id=aca9245a-bbc2-404f-bf2f-2b4a44fb7af5)
[ERROR:2020-10-14 15:08:45,654] rhasspyserver_hermes: AsrError(error=“Command ‘[‘bash’, ‘/usr/lib/rhasspy/.venv/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/lang’]’ returned non-zero exit status 1.”, site_id=‘master’, context=None, session_id=‘7c3cf098-f7d6-4af5-b4fe-7ac0e632f94d’)
[ERROR:2020-10-14 15:08:45,654] rhasspyserver_hermes: Command ‘[‘bash’, ‘/usr/lib/rhasspy/.venv/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/lang’]’ returned non-zero exit status 1.
Traceback (most recent call last):
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1235, in api_train
result = await core.train()
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 466, in train
raise TrainingFailedException(reason=asr_response.error)
rhasspyserver_hermes.TrainingFailedException: Command ‘[‘bash’, ‘/usr/lib/rhasspy/.venv/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/dict’, ‘’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/local/lang’, ‘/share/rhasspy/profiles/nl/kaldi/model/data/lang’]’ returned non-zero exit status 1.

FYI: I downgraded to 2.5.5 and training is working fine

Thanks for catching this. I found a solution that will be rolled into 2.5.7.

The Dutch Kaldi model uses a non-standard silence phone [SIL] instead of SIL. You can edit silence_phones.txt or just wait for the update.