Speech-To-Phrase Add-on Unable to Train

Hey, I don’t know if this is the right place to ask this. But I’ve got a HAOS setup running on a virtual machine and I can’t get the Speech-To-Phrase add-on working.

I’ve pasted the logs of the error. Let me know you need any more info from me

ERROR:root: Unexpected error while training en_US-rhasspy
Traceback (most recent call last):
  File "/usr/src/.venv/lib/python3.11/site-packages/speech_to_phrase/__main__.py", line 181, in _train_model
    await train(model, settings, hass_info.things, force_retrain=force_retrain)
  File "/usr/src/.venv/lib/python3.11/site-packages/speech_to_phrase/train.py", line 72, in train
    await train_kaldi(model, settings, lexicon, fst)
  File "/usr/src/.venv/lib/python3.11/site-packages/speech_to_phrase/train_kaldi.py", line 75, in train_kaldi
    await _create_arpa(fst, train_dir, settings.tools)
  File "/usr/src/.venv/lib/python3.11/site-packages/speech_to_phrase/train_kaldi.py", line 238, in _create_arpa
    await tools.async_run_pipeline(
  File "/usr/src/.venv/lib/python3.11/site-packages/speech_to_phrase/speech_tools.py", line 151, in async_run_pipeline
    raise RuntimeError(error_text)
RuntimeError: Unexpected error running command ngramcount --order=3 /share/speech-to-phrase/train/en_US-rhasspy/data/lang/G.arpa.fst - | ngrammake --method=kneser_ney | ngramprint --ARPA - /share/speech-to-phrase/train/en_US-rhasspy/data/lang/lm.arpa: LEVEL(FST_FLAGS_ngram_error_fatal ? base_logging::FATAL : base_logging::ERROR): NGramAbsolute: No discount bin for discounting
LEVEL(FST_FLAGS_ngram_error_fatal ? base_logging::FATAL : base_logging::ERROR): NGramMake: Error in smoothing state 381
LEVEL(FST_FLAGS_ngram_error_fatal ? base_logging::FATAL : base_logging::ERROR): NGramKneserNey: failed to make model
ERROR: FstHeader::Read: Bad FST header: standard input. Magic number not matched. Got: 0

Good news I’ve figured it out after many haos test installations. Turns out one of my exposed entities was pretty unpronounceable, so it just gave up on the training. All in working order now!

1 Like