pasquetje - 2007-01-04

hello, 

I put my message back in the right forum...
I'm currently implementing Sphinx as a mxj Max MSP external (www.cycling74.com). Everything is perfectly fine with gram files. 
I now want to use language models. For instance the hub4 demo example. 
I have to make it work like the hellodigits demo example : reading the audio stream from a buffer or a soundfile. 

I have tried to make a mix between hub4.config.xml and hellodigits.config.xml. I get the following error : 

------------------------------------------------------------------ 
• error: 10:26.026 WARNING dictionary Missing word: <unk> 
• error: in edu.cmu.sphinx.linguist.dictionary.FastDictionary:getWord-dictionary 
• error: 10:26.028 WARNING dictionary Missing word: abidjan 
• error: in edu.cmu.sphinx.linguist.dictionary.FastDictionary:getWord-dictionary 

etc................ 
------------------------------------------------------------------ 

What am I doing wrong? 

Here is my config.xml file : 



<?xml version="1.0" encoding="UTF-8"?> 

<!-- 
Sphinx-4 Configuration file 
--> 

<!-- ******** --> 
<!-- tidigits configuration file --> 
<!-- ******** --> 

<config>  


<!-- ******** --> 
<!-- frequently tuned properties --> 
<!-- ******** -->  

<property name="absoluteBeamWidth" value="-1"/> 
<property name="relativeBeamWidth" value="1E-90"/> 
<property name="wordInsertionProbability" value="1E-36"/> 
<property name="languageWeight" value="8"/> 
<property name="silenceInsertionProbability" value="1"/> 
<property name="skip" value="0"/> 
<property name="logLevel" value="WARNING"/> 
<property name="linguist" value="lexTreeLinguist"/> 
<property name="recognizer" value="recognizer"/> 
<property name="frontend" value="mfcFrontEnd"/> 
<property name="wantUnigramSmear" value="true"/> 

<!-- ******* --> 
<!-- lexTreeLinguist --> 
<!--
******* --> 

<component name="lexTreeLinguist" 
type="edu.cmu.sphinx.linguist.lextree.LexTreeLinguist"> 
<property name="silenceInsertionProbability" 
value="${silenceInsertionProbability}"/> 
<property name="wantUnigramSmear" value="true"/> 
<property name="fillerInsertionProbability" value=".02"/> 
<property name="addFillerWords" value="true"/> 
<property name="acousticModel" value="hub4"/> 
<property name="languageModel" value="trigramModel"/> 
<property name="wordInsertionProbability" 
value="${wordInsertionProbability}"/> 
<property name="languageWeight" value="11"/> 
<property name="logMath" value="logMath"/> 
<property name="dictionary" value="dictionary"/> 
<property name="unigramSmearWeight" value="1"/> 
<property name="cacheSize" value="0"/> 
<property name="generateUnitStates" value="false"/> 
<property name="unitManager" value="unitManager"/> 
</component> 

<!-- ******** --> 
<!-- The connectedDigitsRecognizer configuration --> 
<!-- ******** -->  

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


<!-- ******** --> 
<!-- The Decoder configuration --> 
<!-- ******** -->  

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

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

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

<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"/> 
</component> 

<!-- ******* --> 
<!-- wordPruningSearchManager --> 
<!--
******* --> 

<component name="wordPruningSearchManager" 
type="edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager"> 
<property name="scorer" value="threadedScorer"/> 
<property name="pruner" value="trivialPruner"/> 
<property name="acousticLookaheadFrames" value="2.0"/> 
<property name="logMath" value="logMath"/> 
<property name="activeListManager" value="activeListManager"/> 
<property name="buildWordLattice" value="false"/> 
<property name="relativeBeamWidth" value="1E-60"/> 
<property name="growSkipInterval" value="8"/> 
<property name="linguist" value="lexTreeLinguist"/> 
<property name="checkStateOrder" value="false"/> 
<property name="keepAllTokens" value="true"/> 
</component> 

<!-- ******* --> 
<!-- activeListManager --> 
<!--
******* --> 

<component name="activeListManager" 
type="edu.cmu.sphinx.decoder.search.SimpleActiveListManager"> 
<propertylist name="activeListFactories"> 
<item>unitExitActiveList</item> 
<item>wordActiveList</item> 
<item>wordActiveList</item> 
<item>activeList</item> 
<item>activeList</item> 
<item>activeList</item> 
</propertylist> 
</component> 

<!-- ******* --> 
<!-- unitExitActiveList --> 
<!--
******* --> 

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

<!-- ******* --> 
<!-- wordActiveList --> 
<!--
******* --> 

<component name="wordActiveList" 
type="edu.cmu.sphinx.decoder.search.WordActiveListFactory"> 
<property name="absoluteBeamWidth" value="21"/> 
<property name="logMath" value="logMath"/> 
<property name="relativeBeamWidth" value="1E-25"/> 
</component> 

<!-- ******** --> 
<!-- The Dictionary configuration --> 
<!-- ******** --> 

<component name="dictionary" 
type="edu.cmu.sphinx.linguist.dictionary.FastDictionary"> 
<property name="dictionaryPath" value="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"/> 
<property name="fillerPath" value="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"/> 
<property name="addSilEndingPronunciation" value="false"/> 
<property name="allowMissingWords" value="false"/> 
<property name="unitManager" value="unitManager"/> 
</component> 


<!-- ******** --> 
<!-- The acoustic model configuration --> 
<!-- ******** --> 

<component name="hub4"  
type="edu.cmu.sphinx.model.acoustic.HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz.Model"> 
<property name="loader" value="sphinx3Loader"/> 
<property name="unitManager" value="unitManager"/> 
</component> 

<component name="sphinx3Loader" 
type="edu.cmu.sphinx.model.acoustic.HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz.ModelLoader"> 
<property name="logMath" value="logMath"/> 
<property name="unitManager" value="unitManager"/> 
</component> 

<!-- ******* --> 
<!-- trigramModel --> 
<!--
******* --> 

<component name="trigramModel" 
type="edu.cmu.sphinx.linguist.language.ngram.large.LargeTrigramModel"> 
<property name="unigramWeight" value=".5"/> 
<property name="maxDepth" value="3"/> 
<property name="logMath" value="logMath"/> 
<property name="dictionary" value="dictionary"/> 
<property name="location" value="/Users/pasquetje/language_model.arpaformat.DMP"/> 
</component> 

<!-- ******* --> 
<!-- flatUnigramModel --> 
<!--
******* --> 
<component name="flatUnigramModel"  
type="edu.cmu.sphinx.linguist.language.ngram.SimpleNGramModel"> 
<property name="location"  
value="/Users/pasquetje/hub4.flat_unigram.lm"/> 
<property name="logMath" value="logMath"/> 
<property name="dictionary" value="dictionary"/> 
<property name="maxDepth" value="1"/> 
<property name="unigramWeight" value=".7"/> 
</component> 


<!-- ******** --> 
<!-- The unit manager configuration --> 
<!-- ******** --> 

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


<!-- ******** --> 
<!-- The frontend configuration --> 
<!-- ******** --> 

<component name="mfcFrontEnd" type="edu.cmu.sphinx.frontend.FrontEnd"> 
<propertylist name="pipeline"> 
<item>streamDataSource</item> 
<item>premphasizer</item> 
<item>windower</item> 
<item>fft</item> 
<item>melFilterBank</item> 
<item>dct</item> 
<item>batchCMN</item> 
<item>featureExtraction</item> 
</propertylist> 
</component> 

<component name="streamDataSource"  
type="edu.cmu.sphinx.frontend.util.StreamDataSource"> 
<property name="sampleRate" value="44100"/> 
<property name="bitsPerSample" value="16"/> 
<property name="bigEndianData" value="true"/> 
<property name="signedData" value="true"/> 
</component> 

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

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

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

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

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

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

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


<!-- ********* --> 
<!-- monitors --> 
<!--
******** --> 

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

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


<!--
******* --> 
<!-- Miscellaneous components --> 
<!--
********** --> 

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

</config>