Max*_*x K 5 java speech-recognition sphinx4 cmusphinx
我有个问题.你看,我正在创建这个程序,我想要语音识别.CMUSphinx 4似乎是最好的选择,所以我只是下载了罐子并将它们作为压缩库添加到我的项目中.所以我从CMUSphinx Wiki获得了这个代码并且我试了一下.这是代码:
Configuration configuration = new Configuration();
// Set path to acoustic model.
configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us");
// Set path to dictionary.
configuration.setDictionaryPath("resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict");
// Set language model.
configuration.setLanguageModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us.lm.dmp");
Run Code Online (Sandbox Code Playgroud)
不幸的是,似乎我收到了这个错误:
引起:属性异常组件:'acousticModelLoader'属性:'location' - 找不到资源:/ edu/cmu/sphinx/models/en-us/en-us edu.cmu.sphinx.util.props.InternalConfigurationException:找不到资源:/ edu/cmu/sphinx/models/en-us/en-us
所以,我尝试了故障排除并添加了额外的"/"
configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us/");
Run Code Online (Sandbox Code Playgroud)
这似乎解决了它的一部分,但后来,添加额外的"/"后我又收到了一个错误:
引起:属性异常组件:'dictionary'属性:'fillerPath' - 找不到资源:/ edu/cmu/sphinx/models/en-us/en-us // noisedict edu.cmu.sphinx.util.props .InternalConfigurationException:找不到资源:/ edu/cmu/sphinx/models/en-us/en-us // noisedict
注意那里的额外"/".基本上,是否有人有办法绕过这样一个事实:我有或没有额外的"/"错误?在我看来,sphinx4本身的代码中存在错误.我一直在尝试通过反编译错误中涉及的每个类而没有运气来追踪额外"/"的添加位置.救命?
| 归档时间: |
|
| 查看次数: |
1017 次 |
| 最近记录: |