Menu

Error when allocating recognizer using HUB4

Help
jlrice9673
2009-04-06
2012-09-22
  • jlrice9673

    jlrice9673 - 2009-04-06

    I'm trying to use the HUB4 acoustic model and language model with Sphinx4.1.0 Beta2.
    I'm receiving the following error message when allocating the recognizer:
    java.lang.NullPointerException
    at edu.cmu.sphinx.linguist.util.HMMPool.synthesizeUnit(HMMPool.java:145)
    at edu.cmu.sphinx.linguist.util.HMMPool.<init>(HMMPool.java:98)
    at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist.generateHmmTree(LexTreeLinguist.java:364)
    at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist.compileGrammar(LexTreeLinguist.java:353)
    at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist.allocate(LexTreeLinguist.java:279)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.allocate(WordPruningBreadthFirstSearchManager.java:209)
    at edu.cmu.sphinx.decoder.AbstractDecoder.allocate(AbstractDecoder.java:67)
    at edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:157)

    Below is the HUB4 recognizer section of the config.xml :
    <!-- ******** -->
    <!-- word recognizer configuration -->
    <!-- ******** -->

    &lt;component name=&quot;hubRecognizer&quot; 
                          type=&quot;edu.cmu.sphinx.recognizer.Recognizer&quot;&gt;
        &lt;property name=&quot;decoder&quot; value=&quot;hubDecoder&quot;/&gt;
    &lt;/component&gt;
    
    &lt;!-- ******************************************************** --&gt;
    &lt;!-- The Decoder   configuration                              --&gt;
    &lt;!-- ******************************************************** --&gt;
    
    &lt;component name=&quot;hubDecoder&quot; type=&quot;edu.cmu.sphinx.decoder.Decoder&quot;&gt;
        &lt;property name=&quot;searchManager&quot; value=&quot;hubWordPruningSearchManager&quot;/&gt;
        &lt;property name=&quot;featureBlockSize&quot; value=&quot;50&quot;/&gt;
    &lt;/component&gt;
    
    &lt;!-- ******************************************************** --&gt;
    &lt;!-- The Search Manager                                       --&gt;
    &lt;!-- ******************************************************** --&gt;
    
    &lt;component name=&quot;hubWordPruningSearchManager&quot; 
    type=&quot;edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager&quot;&gt;
        &lt;property name=&quot;logMath&quot; value=&quot;logMath&quot;/&gt;
        &lt;property name=&quot;linguist&quot; value=&quot;hubLexTreeLinguist&quot;/&gt;
        &lt;property name=&quot;pruner&quot; value=&quot;trivialPruner&quot;/&gt;
        &lt;property name=&quot;scorer&quot; value=&quot;threadedScorer&quot;/&gt;
        &lt;property name=&quot;activeListManager&quot; value=&quot;hubActiveListManager&quot;/&gt;
        &lt;property name=&quot;growSkipInterval&quot; value=&quot;0&quot;/&gt;
        &lt;property name=&quot;checkStateOrder&quot; value=&quot;false&quot;/&gt;
        &lt;property name=&quot;buildWordLattice&quot; value=&quot;false&quot;/&gt;
        &lt;property name=&quot;acousticLookaheadFrames&quot; value=&quot;1.7&quot;/&gt;
        &lt;property name=&quot;relativeBeamWidth&quot; value=&quot;1E-120&quot;/&gt;
    &lt;/component&gt;
    
    
    &lt;!-- ******************************************************** --&gt;
    &lt;!-- The Active Lists                                         --&gt;
    &lt;!-- ******************************************************** --&gt;
    
    &lt;component name=&quot;hubActiveListManager&quot; 
             type=&quot;edu.cmu.sphinx.decoder.search.SimpleActiveListManager&quot;&gt;
        &lt;propertylist name=&quot;activeListFactories&quot;&gt;
        &lt;item&gt;hubStandardActiveListFactory&lt;/item&gt;
        &lt;item&gt;hubWordActiveListFactory&lt;/item&gt;
        &lt;item&gt;hubWordActiveListFactory&lt;/item&gt;
        &lt;item&gt;hubStandardActiveListFactory&lt;/item&gt;
        &lt;item&gt;hubStandardActiveListFactory&lt;/item&gt;
        &lt;item&gt;hubStandardActiveListFactory&lt;/item&gt;
    &lt;/propertylist&gt;
    &lt;/component&gt;
    
    &lt;component name=&quot;hubStandardActiveListFactory&quot; 
             type=&quot;edu.cmu.sphinx.decoder.search.PartitionActiveListFactory&quot;&gt;
        &lt;property name=&quot;logMath&quot; value=&quot;logMath&quot;/&gt;
        &lt;property name=&quot;absoluteBeamWidth&quot; value=&quot;5000&quot;/&gt;
        &lt;property name=&quot;relativeBeamWidth&quot; value=&quot;1E-120&quot;/&gt;
    &lt;/component&gt;
    
    &lt;component name=&quot;hubWordActiveListFactory&quot; 
             type=&quot;edu.cmu.sphinx.decoder.search.PartitionActiveListFactory&quot;&gt;
        &lt;property name=&quot;logMath&quot; value=&quot;logMath&quot;/&gt;
        &lt;property name=&quot;absoluteBeamWidth&quot; value=&quot;200&quot;/&gt;
        &lt;property name=&quot;relativeBeamWidth&quot; value=&quot;1E-80&quot;/&gt;
    &lt;/component&gt;
    
    
    &lt;!-- ******************************************************** --&gt;
    &lt;!-- The linguist  configuration                              --&gt;
    &lt;!-- ******************************************************** --&gt;
    
    &lt;component name=&quot;hubLexTreeLinguist&quot; 
                type=&quot;edu.cmu.sphinx.linguist.lextree.LexTreeLinguist&quot;&gt;
        &lt;property name=&quot;logMath&quot; value=&quot;logMath&quot;/&gt;
        &lt;property name=&quot;acousticModel&quot; value=&quot;hub&quot;/&gt;
        &lt;property name=&quot;languageModel&quot; value=&quot;hubTrigramModel&quot;/&gt;
        &lt;property name=&quot;dictionary&quot; value=&quot;hubDictionary&quot;/&gt;
        &lt;property name=&quot;addFillerWords&quot; value=&quot;false&quot;/&gt;
        &lt;property name=&quot;fillerInsertionProbability&quot; value=&quot;1E-10&quot;/&gt;
        &lt;property name=&quot;generateUnitStates&quot; value=&quot;false&quot;/&gt;
        &lt;property name=&quot;wantUnigramSmear&quot; value=&quot;true&quot;/&gt;
        &lt;property name=&quot;unigramSmearWeight&quot; value=&quot;1&quot;/&gt;
        &lt;property name=&quot;wordInsertionProbability&quot; value=&quot;0.7&quot;/&gt;
        &lt;property name=&quot;silenceInsertionProbability&quot; value=&quot;.1&quot;/&gt;
        &lt;property name=&quot;languageWeight&quot; value=&quot;10.5&quot;/&gt;
        &lt;property name=&quot;unitManager&quot; value=&quot;unitManager&quot;/&gt;
    &lt;/component&gt;
    
    
    &lt;!-- ******************************************************** --&gt;
    &lt;!-- The Dictionary configuration                            --&gt;
    &lt;!-- ******************************************************** --&gt;
    &lt;component name=&quot;hubDictionary&quot; 
        type=&quot;edu.cmu.sphinx.linguist.dictionary.FastDictionary&quot;&gt;
        &lt;property name=&quot;dictionaryPath&quot;
                  value=&quot;resource:/edu.cmu.sphinx.model.acoustic.HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz.Model!/edu/cmu/sphinx/model/acoustic/HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz/cmudict.06d&quot;/&gt;
        &lt;property name=&quot;fillerPath&quot; 
              value=&quot;resource:/edu.cmu.sphinx.model.acoustic.HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz.Model!/edu/cmu/sphinx/model/acoustic/HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz/fillerdict&quot;/&gt;
        &lt;property name=&quot;addSilEndingPronunciation&quot; value=&quot;false&quot;/&gt;
        &lt;property name=&quot;wordReplacement&quot; value=&quot;&amp;lt;sil&amp;gt;&quot;/&gt;
        &lt;property name=&quot;unitManager&quot; value=&quot;unitManager&quot;/&gt;
    &lt;/component&gt;
    
    
    &lt;!-- ******************************************************** --&gt;
    &lt;!-- The Language Model configuration                         --&gt;
    &lt;!-- ******************************************************** --&gt;
    
    &lt;component name=&quot;hubTrigramModel&quot; type=&quot;edu.cmu.sphinx.linguist.language.ngram.large.LargeTrigramModel&quot;&gt;
       &lt;property name=&quot;unigramWeight&quot; value=&quot;.5&quot; /&gt; 
       &lt;property name=&quot;maxDepth&quot; value=&quot;3&quot; /&gt; 
       &lt;property name=&quot;logMath&quot; value=&quot;logMath&quot; /&gt; 
       &lt;property name=&quot;dictionary&quot; value=&quot;hubDictionary&quot; /&gt; 
       &lt;property name=&quot;location&quot; value=&quot;C:/sphinx4-1.0beta2/models/language/HUB4_trigram_lm/language_model.arpaformat.DMP&quot; /&gt; 
    &lt;/component&gt;
    
    
    
    &lt;!-- ******************************************************** --&gt;
    &lt;!-- The acoustic model configuration                         --&gt;
    &lt;!-- ******************************************************** --&gt;
    &lt;component name=&quot;hub&quot;
               type=&quot;edu.cmu.sphinx.model.acoustic.HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz.Model&quot;&gt;
        &lt;property name=&quot;loader&quot; value=&quot;hubLoader&quot;/&gt;
        &lt;property name=&quot;unitManager&quot; value=&quot;unitManager&quot;/&gt;
    &lt;/component&gt;
    
    &lt;component name=&quot;hubLoader&quot; type=&quot;edu.cmu.sphinx.model.acoustic.HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz.ModelLoader&quot;&gt;
        &lt;property name=&quot;logMath&quot; value=&quot;logMath&quot;/&gt;
        &lt;property name=&quot;unitManager&quot; value=&quot;unitManager&quot;/&gt;
    &lt;/component&gt;
    

    Any suggestions on what the issue may be?

     
    • Nickolay V. Shmyrev

      Most probably it's a typo somewhere. See this thread:

      https://sourceforge.net/forum/message.php?msg_id=7062951

      To help you more I need to get the complete test, not just the configuration file.

       

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.