我正在使用开源的sphinx sdk来做一些语音识别。我目前正在运行HelloWorld示例。然而,响应非常缓慢,需要多次尝试才能识别一个单词,有时它会识别它,但需要一点时间才能输出我所说的话。有什么想法可以改进这一点吗?此外,当我更改语法文件时,它不会更新和识别我的新词。
谢谢
发布于 2014-08-19 18:06:06
Sphinx
。如果你知道你必须识别的声音的模式,那么你可以使用custom grammar
.标准定义你自己的语法文件。(more)
配置示例
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;
https://stackoverflow.com/questions/6631017
复制相似问题