我正在使用开源的sphinx sdk进行语音识别。我目前正在运行HelloWorld示例。然而,响应非常缓慢,需要多次尝试才能识别一个单词,有时它会识别它,但需要一点点输出我所说的内容。任何想法如何改善这个?此外,当我更改语法文件时,它不会更新并识别我的新单词。
由于
答案 0 :(得分:1)
Sphinx
。如果您知道必须识别的语音模式,则可以使用custom grammar
配置。示例配置
Configuration configuration = new Configuration();
configuration.setAcousticModelPath(ACOUSTIC_MODEL);
configuration.setDictionaryPath(DICTIONARY_PATH);
configuration.setGrammarPath(GRAMMAR_PATH);
configuration.setUseGrammar(true);
configuration.setGrammarName("mygrammar");
LiveSpeechRecognizer recognizer = new LiveSpeechRecognizer(configuration);
示例语法文件
#JSGF V1.0;
grammar mygrammar;
public <COMMON_COMMAND> = [please] turn (on | off) lighs;