2011-09-14 2 views
2

현재 우리는 음성 인식을 위해 sphinx4를 사용하고 있습니다. 우리는 구술 형식 응용 프로그램에 대한 좋은 응답을 얻으려고합니다. 입력은 wav 파일이고 우리는 그것을 바꿔 쓰고 싶습니다. Sphinx4가 제공 한 LatticeDemo 및 Transcriber 데모를 살펴 보았습니다. 동일한 구성을 사용할 때 응답이 거의 없습니다. 구성 파일에서 조정을 시도했지만 단순히 단어를 인식하지 못합니다. 제공된 transcriber 데모는 자릿수 용이며, 단어를 이해하도록 config 파일을 수정했습니다. 그러나 나는 뭔가를 놓치고 있는지 잘 모르겠습니다. config 파일을 첨부했습니다. 친절하게 모든 개선을 제안 할 수 있습니다. 나쁜 인식 정확도에 대한sphinx4에서 음성 인식 응답이 좋지 않습니다.

<config>   
    <!-- ******************************************************** --> 
    <!-- frequently tuned properties        --> 
    <!-- ******************************************************** --> 
    <property name="absoluteBeamWidth" value="500"/> 
    <property name="relativeBeamWidth" value="1E-60"/> 
    <property name="absoluteWordBeamWidth" value="20"/> 
    <property name="relativeWordBeamWidth" value="1E-40"/> 
    <property name="wordInsertionProbability" value="1E-16"/> 
    <property name="languageWeight" value="7.0"/> 
    <property name="silenceInsertionProbability" value=".1"/> 
    <property name="frontend" value="epFrontEnd"/> 
    <property name="recognizer" value="recognizer"/> 
    <property name="showCreations" value="false"/> 


    <!-- ******************************************************** --> 
    <!-- word recognizer configuration       --> 
    <!-- ******************************************************** --> 

    <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> 
      <item>recognizerMonitor </item> 
     </propertylist> 
    </component> 

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

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

    <!-- ******************************************************** --> 
    <!-- The Search Manager          --> 
    <!-- ******************************************************** --> 

    <component name="wordPruningSearchManager" 
    type="edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager"> 
     <property name="logMath" value="logMath"/> 
     <property name="linguist" value="lexTreeLinguist"/> 
     <property name="pruner" value="trivialPruner"/> 
     <property name="scorer" value="threadedScorer"/> 
     <property name="activeListManager" value="activeListManager"/> 
     <property name="growSkipInterval" value="0"/> 
     <property name="checkStateOrder" value="false"/> 
     <property name="buildWordLattice" value="true"/> 
     <property name="acousticLookaheadFrames" value="1.7"/> 
     <property name="relativeBeamWidth" value="${relativeBeamWidth}"/> 
    </component> 


    <!-- ******************************************************** --> 
    <!-- The Active Lists           --> 
    <!-- ******************************************************** --> 

    <component name="activeListManager" 
      type="edu.cmu.sphinx.decoder.search.SimpleActiveListManager"> 
     <propertylist name="activeListFactories"> 
     <item>standardActiveListFactory</item> 
     <item>wordActiveListFactory</item> 
     <item>wordActiveListFactory</item> 
     <item>standardActiveListFactory</item> 
     <item>standardActiveListFactory</item> 
     <item>standardActiveListFactory</item> 
    </propertylist> 
    </component> 

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

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

    <!-- ******************************************************** --> 
    <!-- The Pruner            --> 
    <!-- ******************************************************** --> 
    <component name="trivialPruner" 
       type="edu.cmu.sphinx.decoder.pruner.SimplePruner"/> 

    <!-- ******************************************************** --> 
    <!-- TheScorer            --> 
    <!-- ******************************************************** --> 
    <component name="threadedScorer" 
       type="edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer"> 
     <property name="frontend" value="${frontend}"/> 
    </component> 

    <!-- ******************************************************** --> 
    <!-- The linguist configuration        --> 
    <!-- ******************************************************** --> 

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


    <!-- ******************************************************** --> 
    <!-- The Dictionary configuration       --> 
    <!-- ******************************************************** --> 
    <component name="dictionary" 
     type="edu.cmu.sphinx.linguist.dictionary.FastDictionary"> 
     <property name="dictionaryPath" 
        value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d"/> 
     <property name="fillerPath" 
       value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/noisedict"/> 
     <property name="addSilEndingPronunciation" value="false"/> 
     <property name="wordReplacement" value="&lt;sil&gt;"/> 
     <property name="unitManager" value="unitManager"/> 
    </component> 


    <!-- ******************************************************** --> 
    <!-- The Language Model configuration       --> 
    <!-- ******************************************************** --> 
    <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="./models/language/wsj/wsj5kc.Z.DMP"/> 
    </component> 


    <!-- ******************************************************** --> 
    <!-- The acoustic model configuration       --> 
    <!-- ******************************************************** --> 
    <component name="wsj" 
       type="edu.cmu.sphinx.linguist.acoustic.tiedstate.TiedStateAcousticModel"> 
     <property name="loader" value="wsjLoader"/> 
     <property name="unitManager" value="unitManager"/> 
    </component> 

    <component name="wsjLoader" type="edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader"> 
     <property name="logMath" value="logMath"/> 
     <property name="unitManager" value="unitManager"/> 
     <property name="location" value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz"/> 
    </component> 

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

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


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

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

    <component name="audioFileDataSource" type="edu.cmu.sphinx.frontend.util.AudioFileDataSource"/> 


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

    <component name="dataBlocker" type="edu.cmu.sphinx.frontend.DataBlocker"/> 

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

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

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

    <component name="preemphasizer" 
     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="liveCMN" 
       type="edu.cmu.sphinx.frontend.feature.LiveCMN"/> 

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

    <!-- Newly Added.. --> 
    <component name="streamDataSource" 
     type="edu.cmu.sphinx.frontend.util.StreamDataSource"> 
     <property name="sampleRate" value="16000"/> 
     <property name="bigEndianData" value="false"/> 
    </component> 

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

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

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

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

    <component name="recognizerMonitor" 
       type="edu.cmu.sphinx.instrumentation.RecognizerMonitor"> 
     <property name="recognizer" value="${recognizer}"/> 
     <propertylist name="allocatedMonitors"> 
      <item>configMonitor </item> 
     </propertylist> 
    </component> 

    <component name="configMonitor" 
       type="edu.cmu.sphinx.instrumentation.ConfigMonitor"> 
     <property name="showConfig" 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> 

답변

7

가장 일반적인 이유는 다음과 같습니다

  1. 들어오는 오디오의 샘플 속도의 불일치. 16khz 16 비트 모노 리틀 엔디안 파일이어야합니다. 재 샘플링으로 소스의 샘플 속도를 수정해야합니다.

  2. mp3에서 디코딩 된 오디오 파일의 제로 묵음 영역이 디코더를 중단합니다. 이 문제를 해결하기 위해 디더링을 사용하여 작은 랜덤 노이즈를 도입 할 수 있습니다.

  3. 음향 모델의 불일치. 음향 모델 적응을 사용하여 정확도 향상

  4. 언어 모델의 불일치. 디코딩하려는 어휘와 일치하는 고유 한 언어 모델을 만들 수 있습니다.

당신은 튜토리얼에서 더 많은 정보를 얻을 수 있습니다 :

http://cmusphinx.sourceforge.net/wiki/tutorial

당신은 항상 당신이 해독하려고하는 오디오 샘플을 제공 할 수 있습니다 자세한 도움말을 얻을 수 있습니다. 개발자가 문제를 더 잘 분석 할 수 있도록 도와줍니다. 또한 디코더에서 얻은 실제 결과와 기대치를 제공하는 것이 좋습니다.

2

CMU 스핑크스 그냥 몇 가지 지식을 공유를 위해, 나를 위해 좋은 작동하고, 내 설정은 다음과 같습니다 물론

  • 리눅스 OS.
  • 나중에 32KHz .wav 파일을 녹음하여 인식 자에게 audioFileDataSource로 전달하여 음성을 Text로 변환합니다.
  • Trigram 언어 모델 (SimpleNGramModel 클래스)
  • 내 언어 모델은 원하는 단어/구문으로 생성 한 사용자 지정 모델입니다. (사용 된 CMU 캠 툴킷 버전 2 (
  • 내 음향 모델은 어떤 이유로 WSJ_8gau_13dCep_8kHz_31mel_200Hz_3500Hz.jar와 월스트리트 저널 (TiedStateAcousticModel 클래스) 및 wsjLoader (Sphinx3Loader 클래스) (인) 내 자신의 trigram.arpa 파일을 생성 할 http://svr-www.eng.cam.ac.uk/~prc14/toolkit_documentation.html에서 제공 문서, 이는 16kHz의 모델보다 더 나)와 사전에 더 작동합니다.
  • 내가 melFilterBank (음향 모델 매개 변수까지 조정)과 liveCMN와 라이브 프런트 엔드를 사용합니다.

나는 키를 생성하는 생각 도구를 사용하여 적절한 trigram.arpa 파일을 만듭니다.

필요에 따라 스핑크스 설정 속성을 조정해야합니다. 마술 총알이 없기 때문에 speechClassifierThreshold (44) 및 speechMarkerTrailer (77)가 도움이 될 수 있습니다.

호프가 도움이되거나 적어도 아이디어를 제공 할 수 있기를 바랍니다.