3

私はキーワード スポッティング システムを構築しようとしていますが、プロジェクトの基盤として、sphinx 4 のブランチであるこれを選択しました。

wav ファイルで適切に動作します (単一のキーワードで少なくとも 70%)。しかし、クライアントからサーバーにファイルを送信する時間を節約するために、最初にクライアント側で wav ファイルをケプストラムに変換してから、ケプストラムを送信することにしました。この作業はFeaturefiledumperによって実行されます。

しかし、ケプストラムを元の KWS システムにロードすると、その精度はひどいものになります。クライアントにいくつかの作品を入れただけで、精度にはそれほど影響しないはずだと思っていました。元の KWS システムは、各単語を適切なブロックに分割して認識できます。スペクトルを入力として使用した後、システムはすべての単語を適切に分割することさえできません。それが高精度を出せない理由でもあると思います。

ファイル送信の時間を節約しながら、KWS システムの妥当な精度を維持する方法を見つけたいと考えています。構成で見逃したものはありますか、それともニーズを満たす別の方法がありますか?

クライアント側の構成は次のとおりです。

<config>

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

<component name="cepstraFrontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
    <propertylist name="pipeline">
        <item>streamDataSource</item>
        <item>preemphasizer</item>
        <item>windower</item>
        <item>fft</item>
        <item>melFilterBank</item>
        <item>dct</item>
    </propertylist>
</component>

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

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

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

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

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

<component name="streamDataSource"
           type="edu.cmu.sphinx.frontend.util.StreamDataSource">
    <property name="sampleRate" value="16000"/>
</component>

</config>

サーバー側の構成は次のとおりです。

<config>

<property name="logLevel" value="WARNING" />
<property name="absoluteBeamWidth" value="-1" />
<property name="relativeBeamWidth" value="1E-150" />
<property name="wordInsertionProbability" value="0.7" />
<property name="languageWeight" value="7" />

<property name="frontend" value="epFrontEnd" />
<property name="recognizer" value="recognizer" />
<property name="showCreations" value="false" />
<property name="outOfGrammarProbability" value="1E-10"/>
<property name="phoneInsertionProbability" value="1E-55"/>  
<component name="recognizer" type="edu.cmu.sphinx.recognizer.Recognizer">
    <property name="decoder" value="decoder" />
</component>

<component name="decoder" type="edu.cmu.sphinx.decoder.Decoder">
    <property name="searchManager" value="searchManager" />
</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" />
</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}" />
</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}" />
</component>

<component name="FlatLinguist" type="edu.cmu.sphinx.linguist.KWSFlatLinguist.KWSFlatLinguist">
    <property name="logMath" value="logMath" />
    <property name="grammar" value="NoSkipGrammar" />
    <property name="acousticModel" value="wsj" />       
    <property name="wordInsertionProbability" value="${wordInsertionProbability}" />
    <property name="languageWeight" value="${languageWeight}" />
    <property name="unitManager" value="unitManager" /> 
    <property name="addOutOfGrammarBranch" value="true"/>
    <property name="phoneLoopAcousticModel" value="WSJ"/>
    <property name="outOfGrammarProbability" value="${outOfGrammarProbability}"/>
    <property name="phoneInsertionProbability" value="${phoneInsertionProbability}"/>
    <property name="dumpGStates" value ="true"/>    
</component>

<component name="NoSkipGrammar" type="edu.cmu.sphinx.linguist.language.grammar.NoSkipGrammar">
    <property name="dictionary" value="dictionary" />
    <property name="logMath" value="logMath" />
    <property name="addSilenceWords" value="false" />
</component>

<component name="dictionary" type="edu.cmu.sphinx.linguist.dictionary.AllWordDictionary">
    <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>

<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>

<component name="unitManager" type="edu.cmu.sphinx.linguist.acoustic.UnitManager" />
<!-- additions start-->
<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>

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

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

<component name="sphinx3Loader"
           type="edu.cmu.sphinx.model.acoustic.TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader">
    <property name="logMath" value="logMath"/>
    <property name="unitManager" value="UNITMANAGER"/>
</component>
<!-- additions end -->

<component name="epFrontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
    <propertylist name="pipeline">
        <item>streamCepstrumSource </item>
        <item>BatchCMN </item>
        <item>featureExtraction </item>
    </propertylist>
</component>

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

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

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

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

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

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

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

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

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

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

<component name="streamCepstrumSource" type="edu.cmu.sphinx.frontend.util.StreamCepstrumSource">
    <property name="sampleRate" value="16000"/>
    </component>

</config>      

================================================== ================

ニコライに感謝します。その理由は、ファイルを処理するための異なるコンポーネント (StreamDataSource と AudioFileDataSource) であることがわかりました。

しかし、問題があります。私のクライアントは Android システムです。javax.sound.sampled クラスには対応していません。したがって、クライアントで AudioFileDataSource を使用することはできません。StreamDataSource は可能な解決策です。しかし、これら 2 つのコンポーネントが異なる機能セットをもたらす理由がわかりません。

StreamDataSource に AudioFileDataSource と同じ結果を生成させるヒントはありますか?

4

1 に答える 1

1

構成で見逃したものはありますか、それともニーズを満たす別の方法がありますか?

構成は正しいです。何も見逃していません。

自分で書いた伝達関数を間違えた可能性が高いです。最初にデータをファイルとして転送して、すべてが同じであることを確認する必要があります。CepstrumDataSource によって生成された値をダンプして、予想される範囲内にあることを確認することもできます。そのために DataDumper コンポーネントを使用できます。

于 2012-10-30T12:36:18.193 に答える