Pregunta

I had tried to implement sphinx4 speech recognition from All the sphinx4 forum and source.after

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

/*
Exception in thread "main" Property exception component:'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)

*/ Please Anyone Can suggest me that How to solve This Problem

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..
¿Fue útil?

Solución 2

I had Done successfully....with the above code..just while creating the jar ..make sure that u delete the meta-INF folder from the folder if incase its creates while u extrach jar file ..so while zip back again u need to delete that meta-inf folder and then zip it back with the jar -cf .jar_file_name folder_name in Command Promt and u wll be succeded....thanks for the asnwers..but i made it at atlast

Otros consejos

The right way is to perform modifications on the source files i and then compile binaries using ant and run as usual.

To unzip the jar file is a bad idea.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top