title: Speech recognition response is poor in sphinx4
body: <p>Currently we are investigating into using sphinx4 for speech recognition. We are trying to achieve a good response for a dictation type application. The input is a wav file and we wish to transcribe it. I have looked into the LatticeDemo and Transcriber demo provided by Sphinx4. When i utilize the same configuration , the response is pretty  poor. I have tried to tweak in the configuration files but it simply does not recognize the words. the transcriber demo provided is for digits, i have modified the config file to understand words. But i am not sure if i am missing something. I have attached the config file . Kindly suggest any improvements that can be made. </p>
  
  <pre><code>&lt;config&gt;        
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- frequently tuned properties                              --&gt;
      &lt;!-- ******************************************************** --&gt; 
      &lt;property name="absoluteBeamWidth"  value="500"/&gt;
      &lt;property name="relativeBeamWidth"  value="1E-60"/&gt;
      &lt;property name="absoluteWordBeamWidth" value="20"/&gt;
      &lt;property name="relativeWordBeamWidth" value="1E-40"/&gt;
      &lt;property name="wordInsertionProbability" value="1E-16"/&gt;
      &lt;property name="languageWeight" value="7.0"/&gt;
      &lt;property name="silenceInsertionProbability" value=".1"/&gt;
      &lt;property name="frontend" value="epFrontEnd"/&gt;
      &lt;property name="recognizer" value="recognizer"/&gt;
      &lt;property name="showCreations" value="false"/&gt;
  
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- word recognizer configuration                            --&gt;
      &lt;!-- ******************************************************** --&gt; 
  
      &lt;component name="recognizer" 
                            type="edu.cmu.sphinx.recognizer.Recognizer"&gt;
          &lt;property name="decoder" value="decoder"/&gt;
          &lt;propertylist name="monitors"&gt;
              &lt;item&gt;accuracyTracker &lt;/item&gt;
              &lt;item&gt;speedTracker &lt;/item&gt;
              &lt;item&gt;memoryTracker &lt;/item&gt;
              &lt;item&gt;recognizerMonitor &lt;/item&gt;
          &lt;/propertylist&gt;
      &lt;/component&gt;
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The Decoder   configuration                              --&gt;
      &lt;!-- ******************************************************** --&gt; 
  
      &lt;component name="decoder" type="edu.cmu.sphinx.decoder.Decoder"&gt;
          &lt;property name="searchManager" value="wordPruningSearchManager"/&gt;
          &lt;property name="featureBlockSize" value="50"/&gt;
      &lt;/component&gt;
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The Search Manager                                       --&gt;
      &lt;!-- ******************************************************** --&gt; 
  
      &lt;component name="wordPruningSearchManager" 
      type="edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager"&gt;
          &lt;property name="logMath" value="logMath"/&gt;
          &lt;property name="linguist" value="lexTreeLinguist"/&gt;
          &lt;property name="pruner" value="trivialPruner"/&gt;
          &lt;property name="scorer" value="threadedScorer"/&gt;
          &lt;property name="activeListManager" value="activeListManager"/&gt;
          &lt;property name="growSkipInterval" value="0"/&gt;
          &lt;property name="checkStateOrder" value="false"/&gt;
          &lt;property name="buildWordLattice" value="true"/&gt;
          &lt;property name="acousticLookaheadFrames" value="1.7"/&gt;
          &lt;property name="relativeBeamWidth" value="${relativeBeamWidth}"/&gt;
      &lt;/component&gt;
  
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The Active Lists                                         --&gt;
      &lt;!-- ******************************************************** --&gt; 
  
      &lt;component name="activeListManager" 
               type="edu.cmu.sphinx.decoder.search.SimpleActiveListManager"&gt;
          &lt;propertylist name="activeListFactories"&gt;
          &lt;item&gt;standardActiveListFactory&lt;/item&gt;
          &lt;item&gt;wordActiveListFactory&lt;/item&gt;
          &lt;item&gt;wordActiveListFactory&lt;/item&gt;
          &lt;item&gt;standardActiveListFactory&lt;/item&gt;
          &lt;item&gt;standardActiveListFactory&lt;/item&gt;
          &lt;item&gt;standardActiveListFactory&lt;/item&gt;
      &lt;/propertylist&gt;
      &lt;/component&gt;
  
      &lt;component name="standardActiveListFactory" 
               type="edu.cmu.sphinx.decoder.search.PartitionActiveListFactory"&gt;
          &lt;property name="logMath" value="logMath"/&gt;
          &lt;property name="absoluteBeamWidth" value="${absoluteBeamWidth}"/&gt;
          &lt;property name="relativeBeamWidth" value="${relativeBeamWidth}"/&gt;
      &lt;/component&gt;
  
      &lt;component name="wordActiveListFactory" 
               type="edu.cmu.sphinx.decoder.search.PartitionActiveListFactory"&gt;
          &lt;property name="logMath" value="logMath"/&gt;
          &lt;property name="absoluteBeamWidth" value="${absoluteWordBeamWidth}"/&gt;
          &lt;property name="relativeBeamWidth" value="${relativeWordBeamWidth}"/&gt;
      &lt;/component&gt;
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The Pruner                                               --&gt;
      &lt;!-- ******************************************************** --&gt; 
      &lt;component name="trivialPruner" 
                  type="edu.cmu.sphinx.decoder.pruner.SimplePruner"/&gt;
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- TheScorer                                                --&gt;
      &lt;!-- ******************************************************** --&gt; 
      &lt;component name="threadedScorer" 
                  type="edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer"&gt;
          &lt;property name="frontend" value="${frontend}"/&gt;
      &lt;/component&gt;
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The linguist  configuration                              --&gt;
      &lt;!-- ******************************************************** --&gt;
  
      &lt;component name="lexTreeLinguist" 
                  type="edu.cmu.sphinx.linguist.lextree.LexTreeLinguist"&gt;
          &lt;property name="logMath" value="logMath"/&gt;
          &lt;property name="acousticModel" value="wsj"/&gt;
          &lt;property name="languageModel" value="trigramModel"/&gt;
          &lt;property name="dictionary" value="dictionary"/&gt;
          &lt;property name="addFillerWords" value="false"/&gt;
          &lt;property name="fillerInsertionProbability" value="1E-10"/&gt;
          &lt;property name="generateUnitStates" value="false"/&gt;
          &lt;property name="wantUnigramSmear" value="true"/&gt;
          &lt;property name="unigramSmearWeight" value="1"/&gt;
          &lt;property name="wordInsertionProbability" 
                  value="${wordInsertionProbability}"/&gt;
          &lt;property name="silenceInsertionProbability" 
                  value="${silenceInsertionProbability}"/&gt;
          &lt;property name="languageWeight" value="${languageWeight}"/&gt;
          &lt;property name="unitManager" value="unitManager"/&gt;
      &lt;/component&gt;    
  
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The Dictionary configuration                            --&gt;
      &lt;!-- ******************************************************** --&gt;
      &lt;component name="dictionary" 
          type="edu.cmu.sphinx.linguist.dictionary.FastDictionary"&gt;
          &lt;property name="dictionaryPath"
                    value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d"/&gt;
          &lt;property name="fillerPath" 
                value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/noisedict"/&gt;
          &lt;property name="addSilEndingPronunciation" value="false"/&gt;
          &lt;property name="wordReplacement" value="&amp;lt;sil&amp;gt;"/&gt;
          &lt;property name="unitManager" value="unitManager"/&gt;
      &lt;/component&gt;
  
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The Language Model configuration                         --&gt;
      &lt;!-- ******************************************************** --&gt;
      &lt;component name="trigramModel" 
            type="edu.cmu.sphinx.linguist.language.ngram.large.LargeTrigramModel"&gt;
          &lt;property name="unigramWeight" value=".5"/&gt;
          &lt;property name="maxDepth" value="3"/&gt;
          &lt;property name="logMath" value="logMath"/&gt;
          &lt;property name="dictionary" value="dictionary"/&gt;
          &lt;property name="location"
           value="./models/language/wsj/wsj5kc.Z.DMP"/&gt;
      &lt;/component&gt;
  
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The acoustic model configuration                         --&gt;
      &lt;!-- ******************************************************** --&gt;
      &lt;component name="wsj"
                 type="edu.cmu.sphinx.linguist.acoustic.tiedstate.TiedStateAcousticModel"&gt;
          &lt;property name="loader" value="wsjLoader"/&gt;
          &lt;property name="unitManager" value="unitManager"/&gt;
      &lt;/component&gt;
  
      &lt;component name="wsjLoader" type="edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader"&gt;
          &lt;property name="logMath" value="logMath"/&gt;
          &lt;property name="unitManager" value="unitManager"/&gt;
          &lt;property name="location" value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz"/&gt;
      &lt;/component&gt;
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The unit manager configuration                           --&gt;
      &lt;!-- ******************************************************** --&gt;
  
      &lt;component name="unitManager" 
          type="edu.cmu.sphinx.linguist.acoustic.UnitManager"/&gt;
  
  
      &lt;!-- ******************************************************** --&gt;
      &lt;!-- The frontend configuration                               --&gt;
      &lt;!-- ******************************************************** --&gt;
  
      &lt;component name="epFrontEnd" type="edu.cmu.sphinx.frontend.FrontEnd"&gt;
          &lt;propertylist name="pipeline"&gt;
              &lt;item&gt;audioFileDataSource &lt;/item&gt;
              &lt;item&gt;dataBlocker &lt;/item&gt;
              &lt;item&gt;speechClassifier &lt;/item&gt;
              &lt;item&gt;speechMarker &lt;/item&gt;
              &lt;item&gt;nonSpeechDataFilter &lt;/item&gt;
              &lt;item&gt;preemphasizer &lt;/item&gt;
              &lt;item&gt;windower &lt;/item&gt;
              &lt;item&gt;fft &lt;/item&gt;
              &lt;item&gt;melFilterBank &lt;/item&gt;
              &lt;item&gt;dct &lt;/item&gt;
              &lt;item&gt;liveCMN &lt;/item&gt;
              &lt;item&gt;featureExtraction &lt;/item&gt;
          &lt;/propertylist&gt;
      &lt;/component&gt;
  
      &lt;component name="audioFileDataSource" type="edu.cmu.sphinx.frontend.util.AudioFileDataSource"/&gt;
  
  
      &lt;component name="microphone" 
                  type="edu.cmu.sphinx.frontend.util.Microphone"&gt;
          &lt;property name="closeBetweenUtterances" value="false"/&gt;
      &lt;/component&gt;
  
      &lt;component name="dataBlocker" type="edu.cmu.sphinx.frontend.DataBlocker"/&gt;
  
      &lt;component name="speechClassifier"
                  type="edu.cmu.sphinx.frontend.endpoint.SpeechClassifier"&gt;
          &lt;property name="threshold" value="13"/&gt;
      &lt;/component&gt;
  
      &lt;component name="nonSpeechDataFilter" 
                  type="edu.cmu.sphinx.frontend.endpoint.NonSpeechDataFilter"/&gt;
  
      &lt;component name="speechMarker" 
                  type="edu.cmu.sphinx.frontend.endpoint.SpeechMarker"&gt;
          &lt;property name="speechTrailer" value="50"/&gt;
      &lt;/component&gt;
  
      &lt;component name="preemphasizer"
          type="edu.cmu.sphinx.frontend.filter.Preemphasizer"/&gt;
  
      &lt;component name="windower" 
      type="edu.cmu.sphinx.frontend.window.RaisedCosineWindower"/&gt;
  
      &lt;component name="fft" 
          type="edu.cmu.sphinx.frontend.transform.DiscreteFourierTransform"/&gt;
  
      &lt;component name="melFilterBank" 
          type="edu.cmu.sphinx.frontend.frequencywarp.MelFrequencyFilterBank"/&gt;
  
      &lt;component name="dct" 
              type="edu.cmu.sphinx.frontend.transform.DiscreteCosineTransform"/&gt;
  
      &lt;component name="liveCMN" 
                  type="edu.cmu.sphinx.frontend.feature.LiveCMN"/&gt;
  
      &lt;component name="featureExtraction" 
          type="edu.cmu.sphinx.frontend.feature.DeltasFeatureExtractor"/&gt;
  
      &lt;!-- Newly Added..   --&gt;
      &lt;component name="streamDataSource"
          type="edu.cmu.sphinx.frontend.util.StreamDataSource"&gt;
          &lt;property name="sampleRate" value="16000"/&gt;
          &lt;property name="bigEndianData" value="false"/&gt;
      &lt;/component&gt;
  
      &lt;!-- ******************************************************* --&gt;
      &lt;!--  monitors                                               --&gt;
      &lt;!-- ******************************************************* --&gt;
  
      &lt;component name="accuracyTracker" 
                  type="edu.cmu.sphinx.instrumentation.BestPathAccuracyTracker"&gt;
          &lt;property name="recognizer" value="${recognizer}"/&gt;
          &lt;property name="showRawResults" value="false"/&gt;
          &lt;property name="showAlignedResults" value="false"/&gt;
      &lt;/component&gt;
  
      &lt;component name="memoryTracker" 
                  type="edu.cmu.sphinx.instrumentation.MemoryTracker"&gt;
          &lt;property name="recognizer" value="${recognizer}"/&gt;
      &lt;property name="showDetails" value="false"/&gt;
      &lt;property name="showSummary" value="false"/&gt;
      &lt;/component&gt;
  
      &lt;component name="speedTracker" 
                  type="edu.cmu.sphinx.instrumentation.SpeedTracker"&gt;
          &lt;property name="recognizer" value="${recognizer}"/&gt;
          &lt;property name="frontend" value="${frontend}"/&gt;
      &lt;property name="showDetails" value="false"/&gt;
      &lt;/component&gt;
  
      &lt;component name="recognizerMonitor" 
                  type="edu.cmu.sphinx.instrumentation.RecognizerMonitor"&gt;
          &lt;property name="recognizer" value="${recognizer}"/&gt;
          &lt;propertylist name="allocatedMonitors"&gt;
              &lt;item&gt;configMonitor &lt;/item&gt;
          &lt;/propertylist&gt;
      &lt;/component&gt;
  
      &lt;component name="configMonitor" 
                  type="edu.cmu.sphinx.instrumentation.ConfigMonitor"&gt;
          &lt;property name="showConfig" value="false"/&gt;
      &lt;/component&gt;
  
  
      &lt;!-- ******************************************************* --&gt;
      &lt;!--  Miscellaneous components                               --&gt;
      &lt;!-- ******************************************************* --&gt;
  
      &lt;component name="logMath" type="edu.cmu.sphinx.util.LogMath"&gt;
          &lt;property name="logBase" value="1.0001"/&gt;
          &lt;property name="useAddTable" value="true"/&gt;
      &lt;/component&gt;
  &lt;/config&gt;
  </code></pre>