*************************************************************************
Dear Reader,
All the post in shakthydoss.wordpress.com have been moved to shakthydoss.com
shakthydoss.wordpress.com is no longer functioning. To get the latest updates and follow up your comments please come to shakthydoss.com and get subscribed.
Find Speech recognizer sample code @ http://shakthydoss.com/speech-recognizer-sample-code/
Thank you
shakthydoss
**************************************************************************
March 18, 2011 at 3:59 pm
hwo do u compile the above program using cmu spinx?
March 18, 2011 at 4:46 pm
It is same as compiling any Java program.
You must provide proper heap memory size at the time of execution also make sure that config file and grammar files are in correct path.
June 7, 2011 at 12:10 pm
ok i figured what i was doin wrong,lot many things apparently.
anyway,now i’m getting this error:
Exception in thread “main” java.lang.NullPointerException
at edu.cmu.sphinx.util.props.SaxLoader.load(SaxLoader.java:64)
at edu.cmu.sphinx.util.props.ConfigurationManager.loader(ConfigurationManager.java:383)
at edu.cmu.sphinx.util.props.ConfigurationManager.(ConfigurationManager.java:115)
at HelloDigits.HelloDigits.main(HelloDigits.java:36)
It gives this error where i get the recognizer.something wrong the the config file i guess.it compiles fine though.
June 7, 2011 at 2:14 pm
I Dont know what the changes you have made exactly.
Any How current exception may come due grammar file configuration.
In the Grammar file(XML File) , go to The Grammar configuration section
then check this
June 7, 2011 at 8:28 am
I tried this out,i didn’t include the package statement n i saved the files to my regular directory called Project.IT fives me a NoClassDefFoundError.
Speech Recognition is a major part of my project.Please help.
June 7, 2011 at 2:43 pm
In the Grammar file(XML File) , go to The Grammar configuration section
then check this
property name=”grammarLocation”
value=”resource:/edu.cmu.sphinx.demo.hellodigits.HelloDigits!/edu/cmu/sphinx/demo/hellodigits/”
June 8, 2011 at 3:45 am
ya its right,no problem there.
June 8, 2011 at 3:47 am
Exception in thread “main” java.lang.NullPointerException
at edu.cmu.sphinx.util.props.SaxLoader.load(SaxLoader.java:64)
at edu.cmu.sphinx.util.props.ConfigurationManager.loader(ConfigurationManager.java:383)
at edu.cmu.sphinx.util.props.ConfigurationManager.(ConfigurationManager.java:115)
at hellodigits.HelloDigits.main(HelloDigits.java:36)
June 8, 2011 at 4:33 am
found out the prob.the placement of config.xml was outside the package!
now i am getting this error :
Exception in thread “main” java.lang.NullPointerException
at hellodigits.HelloDigits.main(HelloDigits.java:47)
th eline is:microphone.startRecording();could be wrong?
my mike is connected and working.What
June 8, 2011 at 7:35 am
To techstu123
Take a look of this http://shakthydoss.wordpress.com/2011/06/08/speech-recognizer-execution/
June 8, 2011 at 2:32 am
I have error on recognizer.allocate(); >> null please help as I get disappointed with the error ?? mustafa.adel.elnagar@ieee.org
June 8, 2011 at 7:32 am
To Mustafa adel
Ok this may be help full for you http://shakthydoss.wordpress.com/2011/06/08/speech-recognizer-execution/
February 1, 2012 at 4:57 am
Hi, I have run the 2000 project into my netbeans and it worked fine. However, I am not getting any clue of adding new file in the dictionary. I followed the following process,
PART ONE
Step 1 : Create a txt file “words.txt”, Write all the names of cities and states in it and save.
Step 2 : Open this link : http://www.speech.cs.cmu.edu/tools/lmtool.html
Step 3 : On that page, go to “Sentence corpus file:” section, Browse to “words.txt” file and click “Compile Knowledge Base”.
Step 4 : On next page, Click on “Dictionary” link and save that .DIC file.
PART TWO
Step 1 : Extract WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar file.
Step 2 : Go to edu\cmu\sphinx\model\acoustic\WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz\dict folder.
Step 3 : Open “cmudict.0.6d” file in that folder.
Step 4 : Copy data from .DIC file, you have downloaded in PART ONE, paste it in “cmudict.0.6d” file and save.
Step 5 : Zip the extracted hierarchy back as it was and Zip file named should be same as JAR file.
Now, remove “WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar” file from Project’s CLASSPATH and add “WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.zip” instead of it.
(got these steps from this link http://puneetk.com/expanding-dictionary-of-acoustic-model)
but after following the process, I got this exception message,
class not found !java.lang.ClassNotFoundException: edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model
Exception in thread “main” Property Exception component:’flatLinguist’ property:’acousticModel’ – mandatory property is not set!
edu.cmu.sphinx.util.props.InternalConfigurationException
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:292)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.setupAcousticModel(FlatLinguist.java:207)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:171)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:280)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProperties(SimpleBreadthFirstSearchManager.java:145)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:280)
at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:52)
at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:31)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:280)
at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:78)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:163)
at edu.cmu.sphinx.demo.helloworld.HelloWorld.main(HelloWorld.java:36)
Java Result: 1
Could you please help me to add more words in the project you posted (2000)? It would be great to have a video tutorial on the step of adding a words. I searched and found one video about this on youtube but it didnot work as well.
Thanks in advanced
February 1, 2012 at 7:59 am
I will try and let you know what it is going wrong.