Answer the question
In order to leave comments, you need to log in
Why are HMM Units not recognized?
I used to work with Voce, but I realized that it's better to switch to pure Sphinx4, downloaded the Russian language model, set it up off. guide, but I get an error:
19:43:34.563 SEVERE lexTreeLinguist Bad HMM Unit: lj jul
. 10, 2021 7:43:34 PM edu.cmu.sphinx.linguist.lextree.HMMTree addPronunciation
SEVERE
: Missing HMM for unit lj with lc=z rc=i0 the code:
import edu.cmu.sphinx.api.Configuration;
import edu.cmu.sphinx.api.SpeechResult;
import edu.cmu.sphinx.api.StreamSpeechRecognizer;
import ru.SorestForest.SpeechSettings;
import java.io.FileInputStream;
public class Main {
public static void main(String[] args) throws Exception {
Configuration c = new Configuration();
//c.setGrammarPath(SpeechSettings.GRAMMAR_FILE);
c.setDictionaryPath(SpeechSettings.DICTIONARY_PATH);
//c.setGrammarName(SpeechSettings.GRAMMAR_NAME);
c.setAcousticModelPath(SpeechSettings.ACOUSTIC_MODEL);
c.setLanguageModelPath(SpeechSettings.LANGUAGE_MODEL);
edu.cmu.sphinx.api.StreamSpeechRecognizer recognizer = new StreamSpeechRecognizer(c);
recognizer.startRecognition(new FileInputStream("D:\\Projects\\Kosmos\\src\\main\\resources\\sphinx4\\decoder-test.wav"));
SpeechResult result;
while ((result = recognizer.getResult()) != null) {
System.out.format("Hypothesis: %s\n", result.getHypothesis());
}
recognizer.stopRecognition();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question