I create an acoustic model with CMU Sphinx for my school robot project in my native language and it works very well when I start it from cmd, but when I try to use this acoustic model in my python code the accuracy is much lower.
This is my python code:
import os
from pocketsphinx import LiveSpeech, get_model_path
But it work very well when I use it from cmd, it recognizes precisely almost any word. That's why i think i have enough data. It doesn't work well just when I use it with python.
By the way what is CI and Cd model?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I create an acoustic model with CMU Sphinx for my school robot project in my native language and it works very well when I start it from cmd, but when I try to use this acoustic model in my python code the accuracy is much lower.
This is my python code:
import os
from pocketsphinx import LiveSpeech, get_model_path
model_path = get_model_path()
speech = LiveSpeech(
verbose=False,
sampling_rate=16000,
buffer_size=2048,
no_search=False,
full_utt=False,
hmm=os.path.join(model_path, r'C:\sphinx\albot\output\albot.ci_cont'),
lm=os.path.join(model_path, r'C:\sphinx\albot\output\albot.lm.DMP'),
dic=os.path.join(model_path, r'C:\sphinx\albot\output\albot.dic')
)
for phrase in speech:
print(phrase)
What should I change?
Thanks in advance!
Probably you do not have enough data. CI model is useless anyway, you need to train CD models.
But it work very well when I use it from cmd, it recognizes precisely almost any word. That's why i think i have enough data. It doesn't work well just when I use it with python.
By the way what is CI and Cd model?
So?
ci = context-independent
cd = context-dependent
you can check tutorial for details
ci model most likely means you do not have enoughd data.