Menu

searchManager allocation failed

Help
Anonymous
2010-03-29
2012-09-22
  • Anonymous

    Anonymous - 2010-03-29

    Well I did finally build the DMP from LM and have attempted to move forward
    with it.
    I've tried loads of Config.xml settings which ultimately lead to the same
    error...
    This one reports data/means can't open via an IOException...

    java.lang.RuntimeException: searchManager: allocation of search manager
    resources failed
    at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.allocate(Simp
    leBreadthFirstSearchManager.java:607)
    at edu.cmu.sphinx.decoder.AbstractDecoder.allocate(AbstractDecoder.java:67)
    at edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:157)
    at spokennumbers.STTWave.<init>(STTWave.java:36)
    at spokennumbers.Main.main(Main.java:20)
    Caused by: java.io.IOException: Can't open data/means
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.readS3BinaryHeader
    (Sphinx3Loader.java:622)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadDensityFileBin
    ary(Sphinx3Loader.java:545)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadModelFiles(Sph
    inx3Loader.java:369) </init>

    I started with a Digits style config which worked from the Numbers Demo but
    since I'm tring to build and use my own Language Model (since the existing one
    completely failed with the source I have).
    Anyway I should be able to use a training WAV for Recognition and get the
    exact match from the corpus regardless of quality etc. I hope?
    Here's my current configuration...

    <config> </config>

    <property name="logLevel" value="WARNING"> </property>

    <property name="absoluteBeamWidth" value="-1">
    <property name="relativeBeamWidth" value="1E-80">
    <property name="wordInsertionProbability" value="1E-36">
    <property name="languageWeight" value="8"> </property></property></property></property>

    <property name="frontend" value="epFrontEnd">
    <property name="recognizer" value="recognizer">
    <property name="showCreations" value="false"> </property></property></property>

    <component name="recognizer" type="edu.cmu.sphinx.recognizer.Recognizer">
    <property name="decoder" value="decoder">
    <propertylist name="monitors">
    <item>accuracyTracker</item>
    <item>speedTracker</item>
    <item>memoryTracker</item>
    </propertylist>
    </property></component>

    <component name="decoder" type="edu.cmu.sphinx.decoder.Decoder">
    <property name="searchManager" value="searchManager">
    </property></component>

    <component name="logMath" type="edu.cmu.sphinx.util.LogMath">
    <property name="logBase" value="1.0001">
    <property name="useAddTable" value="true">
    </property></property></component>

    <component name="trivialPruner" type="edu.cmu.sphinx.decoder.pruner.SimplePruner"> </component>

    <component name="threadedScorer" type="edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer">
    <property name="frontend" value="${frontend}">
    <property name="isCpuRelative" value="true">
    <property name="numThreads" value="0">
    <property name="minScoreablesPerThread" value="10">
    <property name="scoreablesKeepFeature" value="true">
    </property></property></property></property></property></component>

    <component name="searchManager" type="edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager">
    <property name="logMath" value="logMath">
    <property name="linguist" value="flatLinguist">
    <property name="pruner" value="trivialPruner">
    <property name="scorer" value="threadedScorer">
    <property name="activeListFactory" value="activeList">
    </property></property></property></property></property></component>

    <component name="activeList" type="edu.cmu.sphinx.decoder.search.PartitionActiveListFactory">
    <property name="logMath" value="logMath">
    <property name="absoluteBeamWidth" value="${absoluteBeamWidth}">
    <property name="relativeBeamWidth" value="${relativeBeamWidth}">
    </property></property></property></component>

    <component name="flatLinguist" type="edu.cmu.sphinx.linguist.flat.FlatLinguist">
    <property name="logMath" value="logMath">
    <property name="grammar" value="jsgfGrammar">
    <property name="acousticModel" value="acousticModel">
    <property name="wordInsertionProbability" value="${wordInsertionProbability}">
    <property name="languageWeight" value="${languageWeight}">
    <property name="unitManager" value="unitManager">
    </property></property></property></property></property></property></component>

    <component name="jsgfGrammar" type="edu.cmu.sphinx.jsapi.JSGFGrammar">
    <property name="grammarLocation" value="file://C:/Library/Java/SphinxTrain-1.0 /tutorial/TestNumbers/etc/etc/TestNumbers.wordList">
    <property name="dictionary" value="dictionary">
    <property name="grammarName" value="hello">
    <property name="logMath" value="logMath">
    </property></property></property></property></component>

    <component name="trigramModel" type="edu.cmu.sphinx.linguist.language.ngram.large.LargeTrigramModel">
    <property name="unigramWeight" value="0.5">
    <property name="maxDepth" value="3">
    <property name="logMath" value="logMath">
    <property name="dictionary" value="dictionary">
    <property name="location" value="file://C:/Library/Java/SphinxTrain-1.0/tutori al/TestNumbers/etc/TestNumbers.lm.dmp">
    </property></property></property></property></property></component>

    <component name="dictionary" type="edu.cmu.sphinx.linguist.dictionary.FastDictionary">
    <property name="dictionaryPath" value="file://C:/Library/Java/SphinxTrain-1.0/ tutorial/TestNumbers/etc/TestNumbers.dic">
    <property name="fillerPath" value="file://C:/Library/Java/SphinxTrain-1.0/tuto rial/TestNumbers/etc/TestNumbers.filler">
    <property name="addSilEndingPronunciation" value="false">
    </property></property></property></component>

    <component name="sphinx3Loader" type="edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader">
    <property name="logMath" value="logMath">
    <property name="unitManager" value="unitManager">
    <property name="location" value="file://C:/Library/Java/SphinxTrain-1.0/tutori al/TestNumbers/model_parameters/TestNumbers.ci_cont">
    </property></property></property></component>

    <component name="acousticModel" type="edu.cmu.sphinx.linguist.acoustic.tiedstate.TiedStateAcousticModel">
    <property name="loader" value="sphinx3Loader">
    <property name="unitManager" value="unitManager">
    </property></property></component>

    <component name="unitManager" <br="">type="edu.cmu.sphinx.linguist.acoustic.UnitManager"/> </component>

    <component name="frontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
    <propertylist name="pipeline">
    <item>microphone </item>
    <item>premphasizer </item>
    <item>windower </item>
    <item>fft </item>
    <item>melFilterBank </item>
    <item>dct </item>
    <item>liveCMN </item>
    <item>featureExtraction </item>
    </propertylist>
    </component>

    <component name="epFrontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
    <propertylist name="pipeline">
    <item>microphone </item>
    <item>speechClassifier </item>
    <item>speechMarker </item>
    <item>nonSpeechDataFilter </item>
    <item>premphasizer </item>
    <item>windower </item>
    <item>fft </item>
    <item>melFilterBank </item>
    <item>dct </item>
    <item>liveCMN </item>
    <item>featureExtraction </item>
    </propertylist>
    </component>

    <component name="speechClassifier" type="edu.cmu.sphinx.frontend.endpoint.SpeechClassifier">
    <property name="threshold" value="13">
    </property></component>

    <component name="nonSpeechDataFilter" type="edu.cmu.sphinx.frontend.endpoint.NonSpeechDataFilter"> </component>

    <component name="speechMarker" type="edu.cmu.sphinx.frontend.endpoint.SpeechMarker">
    <property name="speechTrailer" value="50">
    </property></component>

    <component name="premphasizer" type="edu.cmu.sphinx.frontend.filter.Preemphasizer"> </component>

    <component name="windower" type="edu.cmu.sphinx.frontend.window.RaisedCosineWindower">
    </component>

    <component name="fft" type="edu.cmu.sphinx.frontend.transform.DiscreteFourierTransform"> </component>

    <component name="melFilterBank" type="edu.cmu.sphinx.frontend.frequencywarp.MelFrequencyFilterBank">
    </component>

    <component name="dct" type="edu.cmu.sphinx.frontend.transform.DiscreteCosineTransform"> </component>

    <component name="batchCMN" type="edu.cmu.sphinx.frontend.feature.BatchCMN"> </component>

    <component name="liveCMN" type="edu.cmu.sphinx.frontend.feature.LiveCMN"> </component>

    <component name="featureExtraction" type="edu.cmu.sphinx.frontend.feature.DeltasFeatureExtractor"> </component>

    <component name="microphone" type="edu.cmu.sphinx.frontend.util.Microphone">
    <property name="msecPerRead" value="10">
    <property name="closeBetweenUtterances" value="false">
    </property></property></component>

    <component name="accuracyTracker" <br="">type="edu.cmu.sphinx.instrumentation.BestPathAccuracyTracker">
    <property name="recognizer" value="${recognizer}">
    <property name="showAlignedResults" value="false">
    <property name="showRawResults" value="false">
    </property></property></property></component>

    <component name="memoryTracker" <br="">type="edu.cmu.sphinx.instrumentation.MemoryTracker">
    <property name="recognizer" value="${recognizer}">
    <property name="showSummary" value="false">
    <property name="showDetails" value="false">
    </property></property></property></component>

    <component name="speedTracker" <br="">type="edu.cmu.sphinx.instrumentation.SpeedTracker">
    <property name="recognizer" value="${recognizer}">
    <property name="frontend" value="${frontend}">
    <property name="showSummary" value="true">
    <property name="showDetails" value="false">
    </property></property></property></property></component>

    Which fails when allocate() is called...

    URL digitsConfig =
    Main.class.getResource("Resources/RecogNumbersConfigWave.xml");
    confManager = new ConfigurationManager(digitsConfig);
    jsRecog = (Recognizer) confManager.lookup("recognizer");

    jsRecog.allocate();

    System.out.println("Success! setupJavaSpeech Created Recognizer!");
    }
    catch(Exception ex) {
    ex.printStackTrace();
    System.out.println("Alert! setupJavaSpeech failed to Create Recognizer: " +
    ex.toString());
    }

    For now I've used file:// references over the more complicated resources from
    within the jar bundles etc. which shouldn't matter.
    I'm not really positive which version of Sphinx4 is linked through NetBeans
    but it's a couple months old I think/!?

     
  • Anonymous

    Anonymous - 2010-03-29

    oh I created a wordList for GrammarLocation since that was not there?.. so I
    created it manually... spelt numbers 1-9 one per line and an empty line at the
    end as the rest of them request.

     
  • Nickolay V. Shmyrev

    Please try sphinx4-1.0beta4, the latest released version.

     
  • Anonymous

    Anonymous - 2010-03-29

    Was Version 4.4 now linked to 4.8.1 similar problem...
    java.lang.RuntimeException: searchManager: allocation of search manager
    resources failed
    at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.allocate(Simp
    leBreadthFirstSearchManager.java:643)
    at edu.cmu.sphinx.decoder.AbstractDecoder.allocate(AbstractDecoder.java:87)
    at edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:168)
    at spokennumbers.STTWave.<init>(STTWave.java:36)
    at spokennumbers.Main.main(Main.java:20)
    Caused by: java.net.UnknownHostException: C
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:525)
    at java.net.Socket.connect(Socket.java:475)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
    at sun.net.NetworkClient.openServer(NetworkClient.java:118)
    at sun.net.ftp.FtpClient.openServer(FtpClient.java:488)
    at sun.net.ftp.FtpClient.openServer(FtpClient.java:475)
    at
    sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:270)
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.j
    ava:352)
    at java.net.URL.openStream(URL.java:1010)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.getDataStream(Sphi
    nx3Loader.java:284)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.readS3BinaryHeader
    (Sphinx3Loader.java:585)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadDensityFileBin
    ary(Sphinx3Loader.java:513)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadModelFiles(Sph
    inx3Loader.java:352) </init>

    Unknown Host?!? It's a local file or something?
    It did take awhile before timing-out and barfing this error.

     
  • Anonymous

    Anonymous - 2010-03-29

    Okay I put file://localhost/C:/Library.../etc and changed the GrammarLocation
    and grammarName and my workList file to gram but of course it doesn't like my
    gram file so now I'm following up on what that should be reporting error.
    Oh I remember now...
    <component name="jsgfGrammar" type="edu.cmu.sphinx.jsapi.JSGFGrammar">
    <property name="grammarLocation" value="resource:/spokennumbers.STTWave!/spokennumbers/Resources/">
    <property name="dictionary" value="dictionary">
    <property name="grammarName" value="RecogNumbersGrammar">
    <property name="logMath" value="logMath">
    </property></property></property></property></component>

    JSGF V1.0;

    /
    JSGF Digits Grammar
    /

    grammar RecogNumbersGrammar;

    public <numbers> = (one | two | three | four | five | six | seven | eight |
    nine) * ; </numbers>

    Still doesn't like it but I'll try some stuff and get back to this post...
    Property Exception component:'grammarLocation' property:'grammarLocation' -
    Can't locate resource
    resource:/spokennumbers.STTWave!/spokennumbers/Resources/
    edu.cmu.sphinx.util.props.InternalConfigurationException
    at edu.cmu.sphinx.util.props.ConfigurationManagerUtils.getResource(Configurati
    onManagerUtils.java:503)
    at edu.cmu.sphinx.jsapi.JSGFGrammar.newProperties(JSGFGrammar.java:224)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:460)
    at
    edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:279)
    at
    edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:246)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:460)
    at
    edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:279)
    at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProperties
    (SimpleBreadthFirstSearchManager.java:179)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:460)
    at
    edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:279)
    at
    edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:65)
    at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:37)

     
  • Nickolay V. Shmyrev

    In last versions resource uri shouldn't include class names. So it must be
    simple

    resource:/spokennumbers/Resources/

    See demos for example.

     
  • Anonymous

    Anonymous - 2010-03-29

    I just reference that file directly after taking out the localhost and going
    with the 3 slashes (thanks).
    Now I suppose the next error I see is more in my code to do with referencing
    the sound file.

    Thanks for all your help!

     
  • Anonymous

    Anonymous - 2010-03-29

    I use to use this line of code...
    AudioFileDataSource dataSource = (AudioFileDataSource)
    confManager.lookup("audioFileDataSource");
    But it's returning null now?! any thoughts?

     
  • Anonymous

    Anonymous - 2010-03-29

    I had to do this...
    AudioFileDataSource dataSource = new AudioFileDataSource(3200, null);
    try {
    audioFileURL = new URL("file:///" + audioFile);
    //audioFileURL = new File(audioFile).toURI().toURL();
    //audioFileURL = new URL("file:/C:/MasterDomain/Dev/CanAuto/SpokenNumbers/src/
    spokennumbers/Resources/OneSixSeven.wav");
    }
    catch (Exception ex) {
    System.out.println("Alert! recognizeAudioFile: " + ex.toString());
    return s2t;
    }

    But currently the result is null even though it's directly referencing one of
    the few training files??! Arg...

     
  • Nickolay V. Shmyrev

    This line

    AudioFileDataSource dataSource = (AudioFileDataSource)
    confManager.lookup("audioFileDataSource");

    check for audioFileDataSource component in config.xml and return you the
    object with this name. In your case config.xml has no audioFileDataSource
    component defined. It uses microphone as input:

    <propertylist name="pipeline">
    <item>microphone </item>
    <item>speechClassifier </item> </propertylist>

    In ordre to fix this issue, you need to put audioFileDataSource component into
    frontend pipeline and also define it in xml file. See Transcriber demo for
    details.

     

Log in to post a comment.