synesthesiam / voice2json

Command-line tools for speech and intent recognition on Linux
MIT License
1.09k stars 63 forks source link

Cant not run recipe "launch_program" by profile "en-us_kaldi-zamia @ a2d6be4" #30

Closed davidlin409 closed 3 years ago

davidlin409 commented 3 years ago

When I tries to run recipe "launch_program" by using voice2json profile "en-us_kaldi-zamia @ a2d6be4", I got the following error:

Checking /home/-/.config/voice2json/acoustic_model/data/local/dict/lexicon.txt --> reading /home/-/.config/voice2json/acoustic_model/data/local/dict/lexicon.txt --> text seems to be UTF-8 or ASCII, checking whitespaces --> text contains only allowed whitespaces --> ERROR: phone "G" is not in {, non}silence.txt (line 10) --> ERROR: phone "IH" is not in {, non}silence.txt (line 10) --> ERROR: phone "M" is not in {, non}silence.txt (line 10) --> ERROR: phone "P" is not in {, non}silence.txt (line 10) --> ERROR: phone "F" is not in {, non}silence.txt (line 12) --> ERROR: phone "AY" is not in {, non}silence.txt (line 12) --> ERROR: phone "ER" is not in {, non}silence.txt (line 12) --> ERROR: phone "F" is not in {, non}silence.txt (line 12) --> ERROR: phone "AA" is not in {, non}silence.txt (line 12) --> ERROR: phone "K" is not in {, non}silence.txt (line 12)

Checking /home/-/.config/voice2json/acoustic_model/data/local/dict/extra_questions.txt ... --> reading /home/-/.config/voice2json/acoustic_model/data/local/dict/extra_questions.txt --> text seems to be UTF-8 or ASCII, checking whitespaces --> text contains only allowed whitespaces --> /home/-/.config/voice2json/acoustic_model/data/local/dict/extra_questions.txt is OK --> ERROR validating dictionary directory /home/-/.config/voice2json/acoustic_model/data/local/dict (see detailed error messages above)

Error validating directory /home/-/.config/voice2json/acoustic_model/data/local/dict Traceback (most recent call last): File "/home/-/miniconda3/envs/voice2json/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/-/miniconda3/envs/voice2json/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/-/.local_voice2json/lib/python3.7/site-packages/voice2json/main.py", line 773, in asyncio.run(main()) File "/home/-/miniconda3/envs/voice2json/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/home/-/miniconda3/envs/voice2json/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete return future.result() File "/home/-/.local_voice2json/lib/python3.7/site-packages/voice2json/main.py", line 73, in main await args.func(args, core) File "/home/-/.local_voice2json/lib/python3.7/site-packages/voice2json/main.py", line 745, in train await core.train_profile() File "/home/-/.local_voice2json/lib/python3.7/site-packages/voice2json/core.py", line 65, in train_profile await train.train_profile(self.profile_dir, self.profile) File "/home/-/.local_voice2json/lib/python3.7/site-packages/voice2json/train.py", line 308, in train_profile mixed_language_model_fst=mixed_language_model_fst_path, File "/home/-/.local_voice2json/lib/python3.7/site-packages/rhasspyasr_kaldi/train.py", line 139, in train model_dir, graph_dir, dictionary, language_model, kaldi_dir=kaldi_dir File "/home/-/.local_voice2json/lib/python3.7/site-packages/rhasspyasr_kaldi/train.py", line 227, in train_kaldi subprocess.check_call(prepare_lang, cwd=model_dir, env=extended_env) File "/home/-/miniconda3/envs/voice2json/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['bash', '/home/davidlin409/.local_voice2json/lib/kaldi/egs/wsj/s5/utils/prepare_lang.sh', '/home/davidlin409/.config/voice2json/acoustic_model/data/local/dict', '', '/home/davidlin409/.config/voice2json/acoustic_model/data/local/lang', '/home/davidlin409/.config/voice2json/acoustic_model/data/lang']' returned non-zero exit status 1.

From investigation, it seems that the spelling used by recipe "launch_program" is different from profile "en-us_kaldi-zamia @ a2d6be4". Is it possible to mention this on manual?

synesthesiam commented 3 years ago

Thanks for the feedback! I split out the custom words for Pocketsphinx and Kaldi in commit f83f9dfb9792fcc2fa565e8389413dc4b9efdebd

davidlin409 commented 3 years ago

Thank you 👍 .