Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors while trying to add new words #105

Open
ammyt opened this issue May 7, 2020 · 3 comments
Open

Errors while trying to add new words #105

ammyt opened this issue May 7, 2020 · 3 comments

Comments

@ammyt
Copy link

ammyt commented May 7, 2020

I have been trying to add domain specific (medical) words into the german model, but I unfortunately couldn't find an explanation on how to do that. I tried following: https://chrisearch.wordpress.com/2017/03/11/speech-recognition-using-kaldi-extending-and-using-the-aspire-model/

I was able to create the merged lexicon.txt and lm.arpa but I couldn't complete this because of the different nonsilence phones
--> ERROR: phone "c" is not in {, non}silence.txt (line 38) --> ERROR: phone "au" is not in {, non}silence.txt (line 44) --> ERROR: phone "au" is not in {, non}silence.txt (line 45) ...

I then tried using speech_kaldi_adapt.py from here, but I get
Traceback (most recent call last): File "speech_kaldi_adapt.py", line 35, in <module> from nltools import misc File "build/bdist.linux-x86_64/egg/nltools/__init__.py", line 16, in <module> File "build/bdist.linux-x86_64/egg/nltools/analysis.py", line 16, in <module> File "/usr/local/lib/python2.7/dist-packages/nltools-0.3.20-py2.7.egg/nltools/plotting.py", line 797 ax[0].set_title(f"Component: {component}/{len(output['components'])}, Variance Explained: {var_exp:2.2}", fontsize=18) ^ SyntaxError: invalid syntax
I have been looking for a really long time for a way to add new words into one the existing models, but I unfortunately cannot find enough documentation. My goal is to add some new words and then adapt the grammar (which I have successfully done).

I would really appreciate pointers in the right direction!

@gooofy
Copy link
Owner

gooofy commented May 8, 2020

The main tool we've been using to manually add dictionary entries is

speech_lex_edit.py

which is mentioned here:

https://github.com/gooofy/zamia-speech#manual-editing

@ammyt
Copy link
Author

ammyt commented May 8, 2020

Actually, after closer inspection, I can't seem to be running any of the python scripts. I seem to be getting that syntax error at {var_exp:2.2} in nltools/plotting.py. I can't really figure out why and I'm really sorry if this is a beginner's question

@ammyt
Copy link
Author

ammyt commented May 8, 2020

I managed to solve the issue by building and installing py-nltools, since I was using the wrong nltools version, now I can finally use the scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants