CMUSphinx 德国命令和控制应用程序,准确性差

CMUSphinx German command & control app, bad accuracy

我正在尝试使用 CMUSphinx 和 Java 实现德国命令和控制应用程序。到目前为止,应用程序应该只能识别几个单词(从 1 到 9 的数字,yes/no)。

不幸的是准确度很差。看来,如果一个词被正确识别,那只是偶然。

这是我目前的 java 代码(改编自教程):

public static void main(String[] args) throws IOException {

    // Configuration Object
    Configuration configuration = new Configuration();

    // Set path to the acoustic model.
    configuration.setAcousticModelPath("resource:/cmusphinx-de-voxforge-5.2");

    // Set path to the dictionary.
    configuration.setDictionaryPath("resource:/cmusphinx-voxforge-de.dic");

    // use grammar
    configuration.setGrammarPath("resource:/");
    configuration.setGrammarName("dialog");
    configuration.setUseGrammar(true);

    LiveSpeechRecognizer recognizer = new LiveSpeechRecognizer(configuration);

    recognizer.startRecognition(true);
    SpeechResult result;
    while ((result = recognizer.getResult()) != null) {
        System.out.format("Hypothesis: %s\n", result.getHypothesis());
    }
    recognizer.stopRecognition();
}

这是我的语法文件:

#JSGF V1.0;

grammar dialog;

public <digit> = 1 | 2 | 3 | 4 |5 | 6 | 7 | 8 | 9 | ja | nein; 

我从这里下载了德语声学模型和词典:https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/German/

我在这里明显遗漏了什么吗?问题出在哪里?

在此先致谢并致以亲切的问候。

嗯,准确性不是很好,可能原始数据库没有很多像你这样的例子。部分你的方言也有所贡献,德国人说 7 带 z,而不是带 s。您房间中的部分回声也有帮助。我不确定你是如何录制音频的,如果你在两者之间使用了一些压缩或编解码器,它也可能导致准确性不佳。

您可能想要收集几百个样本并执行 MAP 自适应以提高准确性。

我尝试将 pocketsphinx 与英语和德语模型一起使用,当它带有 predefined/limited 组短语 时,准确性很好!你可以忘记像 "could you please find me a restaurant in the downtown".

这样的一般事情

要使用 pocketshinx 获得良好的准确性:

  • 检查您的麦克风、音频设备、文件和所有内容是否为 16 kHz,同时使用此类声学示例训练通用模型。
  • 您应该创建自己的自己的有限字典您不能使用 cmusphinx-voxforge-de.dic,因为准确性会急剧下降。
  • 您应该创建自己的语言模型。
  • 您可以尝试修改发音文件以适合您的口音。

您可以搜索 Jasper project on GitLab 以查看其实现方式。 您也可以查看 documentation