我已经按照官方网站的所有说明安装了Sphinxbase和sphinx4-1.0beta6。我将Sphinx4文件夹作为Netbeans项目打开,并成功地构建了它,但在运行HelloWorld示例时,我收到了上面的错误:
Exception in thread "main" Property exception component:'dictionary' property:'fillerPath'
Can't locate resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/noisedict edu.cmu.sphinx.util.props.InternalConfigurationException
我使用属于sphinx4-1.0beta5版本的.jar文件将WSJ_8gau13dCep_16k_40mel_130Hz_6800Hz.jar添加到类路径中,因为在beta6版本中它是不存在的。
有人能给我点光吗?
--
我认为问题与config.xml 有关
<component name="dictionary"
type="edu.cmu.sphinx.linguist.dictionary.FastDictionary">
<property name="dictionaryPath" value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d"/>
<property name="fillerPath" value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/noisedict"/>
<property name="addSilEndingPronunciation" value="false"/>
<property name="allowMissingWords" value="false"/>
<property name="unitManager" value="unitManager"/>
</component>
因为在WSJ_8gau13dCep_16k_40mel_130Hz_6800Hz.jar中,我只看到包cd_continuous_8gau、dict等。
好的,只需从sphinx4-1.0beta5版本复制helloworld.config.xml的内容(beta6有缺陷)。