This forum has been awesome at answering my newbie questions. I was able to build and run the helloworld sample using ant. Now I am trying to use NetBeans to create some graphical elements. I brought the code from helloworld demo into a NetBeans project, but when I run it, it never gets beyond the Recognizer.allocate() line. If I pause, I see the stack trace below.
The big difference between my code and the original helloworld code is that I am trying to read in files instead of using resources. So I have this line for my configuration manager:
ConfigurationManager cm = new ConfigurationManager("speech.config.xml");
where speech.config.xml is basically the config.xml from the helloworld demo, except that I have the following grammar section:
And hello.gram is the same hello.gram as in the helloworld demo. I am just guessing on the grammarLocation value -- I couldn't find documentation on it anywhere.
This forum has been awesome at answering my newbie questions. I was able to build and run the helloworld sample using ant. Now I am trying to use NetBeans to create some graphical elements. I brought the code from helloworld demo into a NetBeans project, but when I run it, it never gets beyond the Recognizer.allocate() line. If I pause, I see the stack trace below.
The big difference between my code and the original helloworld code is that I am trying to read in files instead of using resources. So I have this line for my configuration manager:
ConfigurationManager cm = new ConfigurationManager("speech.config.xml");
where speech.config.xml is basically the config.xml from the helloworld demo, except that I have the following grammar section:
<!-- <property name="grammarLocation"
value="resource:/edu.cmu.sphinx.demo.helloworld.HelloWorld!/edu/cmu/sphinx/demo/helloworld/"/>
-->
<property name="grammarName" value="hello"/>
<property name="logMath" value="logMath"/>
</component>
And hello.gram is the same hello.gram as in the helloworld demo. I am just guessing on the grammarLocation value -- I couldn't find documentation on it anywhere.
Any suggestions would be greatly appreciated!
Peter
Stack trace:
"AWT-EventQueue-0"
edu.cmu.sphinx.linguist.acoustic.tiedstate.MixtureComponent.transformStats(MixtureComponent.java:303)
edu.cmu.sphinx.linguist.acoustic.tiedstate.MixtureComponent.precomputeDistance(MixtureComponent.java:239)
edu.cmu.sphinx.linguist.acoustic.tiedstate.MixtureComponent.<init>(MixtureComponent.java:132)
edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader.createSenonePool(ModelLoader.java:514)
edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader.loadModelFiles(ModelLoader.java:460)
edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader.load(ModelLoader.java:368)
edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model.allocate(Model.java:125)
edu.cmu.sphinx.linguist.flat.FlatLinguist.allocateAcousticModel(FlatLinguist.java:256)
edu.cmu.sphinx.linguist.flat.FlatLinguist.allocate(FlatLinguist.java:241)
edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.allocate(SimpleBreadthFirstSearchManager.java:591)
edu.cmu.sphinx.decoder.AbstractDecoder.allocate(AbstractDecoder.java:67)
edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:157)
speechrecognizer.SpeechRecognizerView.startSpeechRecognizer(SpeechRecognizerView.java:102)
speechrecognizer.SpeechRecognizerView.<init>(SpeechRecognizerView.java:61)
speechrecognizer.SpeechRecognizerApp.startup(SpeechRecognizerApp.java:19)
org.jdesktop.application.Application$1.run(Application.java:171)
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
You need to allocate more memory for jvm with -Xmx512m
That fixed it. Thanks!