@SorestForest

Почему не распознаются HMM Unit'ы?

Раньше работал с Voce, но понял что лучше перейти на чистый Sphinx4, скачал модель русского языка, настроил по офф. гайду, но получаю ошибку:

19:43:34.563 SEVERE lexTreeLinguist Bad HMM Unit: lj
июл. 10, 2021 7:43:34 PM edu.cmu.sphinx.linguist.lextree.HMMTree addPronunciation
SEVERE: Missing HMM for unit lj with lc=z rc=i0


Имею след. код:

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

    }
}

Что здесь не так..
Может что-то не догрузил?

P.S
Путь к акустической модели у меня это папка: zero_ru.cd_cont_4000
Путь к языковой модели у меня это файл: cmusphinx-ru-5.2\ru.lm
Словарь у меня это: cmusphinx-ru-5.2\ru.dic

Всё скачено с sourceforge
  • Вопрос задан
  • 40 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы