-1

我曾尝试从所有 sphinx4 论坛和 source.after 实现 sphinx4 语音识别

lots of difficulty i had succesfulll run the sphinx4 speech rocgnition in java in eclipse.but 

now i want that instead of the by default grammer provided in sphinx eg.[  (Hello|good Morning) 

(Bhiksha | Paul | Evandro | Reeta | will)  ]i want that i can add some words in this grammer 

file and that word Should be Like eg."Bhavik" Or somethng else.

I Had Done Following Steps For This Thing To achieve.

1). i had unzip the WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.rar file
2). then i added "Bhavik" Word Sphinx\sphinx4-1.0beta6-bin\sphinx4-1.0beta6\lib   
\WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz\WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz\dict    
\cmudict.0.6d File with its Pronouciation word
    e.g "BHAVIk  B HH AE V AH K"
3). then I had zip abck that rar file With same name and same extention.
4). and then  I had removed old WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar file path from the java file and add refrence of that new genrated rar file.

But Now Problem is that its Throwing me Error whenevr i tried to run that HelloWorld.java File
 with this Error in console

/*
线程“main”中的异常属性异常组件:'dictionary' property:'dictionaryPath'

- Can't locate resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d
edu.cmu.sphinx.util.props.InternalConfigurationException: Can't locate 

resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d
    at edu.cmu.sphinx.util.props.ConfigurationManagerUtils.getResource

(ConfigurationManagerUtils.java:483)
    at edu.cmu.sphinx.linguist.dictionary.FastDictionary.newProperties

(FastDictionary.java:148)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287)
    at edu.cmu.sphinx.linguist.language.grammar.Grammar.newProperties(Grammar.java:105)
    at edu.cmu.sphinx.jsgf.JSGFGrammar.newProperties(JSGFGrammar.java:231)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287)
    at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:246)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287)
    at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProperties

(SimpleBreadthFirstSearchManager.java:182)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287)
    at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:65)
    at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:37)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287)
    at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:90)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:161)
    at edu.cmu.sphinx.demo.helloworld.HelloWorld.main(HelloWorld.java:37)

*/ 请任何人都可以建议我如何解决这个问题

My basic need is To Allow The User Defined Words in Dictionary File Not the Default Words Of 
Sphinx provide..

Anyone Can suggest me in right way...that where i m Wrong and if m right then how to resolve 

this error..
4

2 回答 2

1

正确的方法是对源文件 i 进行修改,然后使用 ant 编译二进制文件并照常运行。

解压缩 jar 文件是个坏主意。

于 2012-08-27T19:43:18.240 回答
0

我已经成功完成了..使用上面的代码..就在创建 jar 时..meta-INF folder如果在您提取 jar 文件时创建了它,请确保您从文件夹中删除..所以当再次压缩时您需要删除那个meta-inf文件夹,然后用jar -cf .jar_file_name folder_name命令提示符把它压缩回去,你会成功的……谢谢你的回答……但我终于做到了

于 2012-09-03T10:26:02.347 回答