S
S
SorestForest2021-07-10 19:08:44
Java
SorestForest, 2021-07-10 19:08:44

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();

    }
}

What's wrong here ..
Maybe something didn't load?

PS
The path to the acoustic model is the folder: zero_ru.cd_cont_4000
The path to the language model is the file: cmusphinx-ru-5.2\ru.lm My
dictionary is: cmusphinx-ru-5.2\ru.dic

Everything is downloaded from sourceforge

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question