Menu

Hanging on Recognizer.allocate()

Help
2009-03-24
2012-09-22
  • Peter Gruenbaum

    Peter Gruenbaum - 2009-03-24

    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:

    <component name="jsgfGrammar" type="edu.cmu.sphinx.jsapi.JSGFGrammar">
        <property name="dictionary" value="dictionary"/>
        <property name="grammarLocation"
             value="file:./hello.gram"/>
    

    <!-- <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)

     
    • Nickolay V. Shmyrev

      You need to allocate more memory for jvm with -Xmx512m

       
    • Peter Gruenbaum

      Peter Gruenbaum - 2009-03-25

      That fixed it. Thanks!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.