首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >wav转换为倒谱导致Shpinx 4关键词识别功能准确率低

wav转换为倒谱导致Shpinx 4关键词识别功能准确率低
EN

Stack Overflow用户
提问于 2012-10-30 19:47:08
回答 1查看 962关注 0票数 3

我正在尝试构建一个关键字识别系统,我选择了this,它是sphinx4的一个分支,作为我的项目的基础。

它与wav文件正常工作(至少70%与单个关键字)。但为了节省从客户端到服务器传输文件的时间,我决定先将wav文件转换为客户端的倒谱,然后再传输该倒谱。这项工作由Featurefiledumper执行。

但是,当将倒谱加载到原始的KWS系统中时,准确性非常糟糕。我想我只是把一些工作放在客户身上,这应该不会对准确性有太大影响。原始的KWS系统可以将每个单词拆分成合适的块,然后进行识别。使用频谱作为输入后,系统甚至不能正确地拆分每个单词。我认为这也是为什么它不能达到高精度的原因。

我想找到一种方法,既节省文件传输的时间,又能保持KWS系统的合理准确性。有没有我在配置中遗漏了什么,或者有其他方法来满足需求?

以下是客户端的配置:

代码语言:javascript
复制
<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>

以下是服务器端的配置:

代码语言:javascript
复制
<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是一种可能的解决方案。但我不知道为什么这两个组件会导致不同的功能集。

是否有提示让StreamDataSource生成与AudioFileDataSource相同的结果?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-10-30 20:36:18

有没有我在配置中遗漏了什么,或者有其他方法来满足需求?

配置正确,您没有遗漏任何内容。

你很可能在你自己写的传递函数中犯了一个错误。您需要首先尝试将数据作为文件传输,以确保所有内容都是相同的。您还可以转储CepstrumDataSource生成的值,以验证它们是否在预期范围内。为此,您可以使用DataDumper组件。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13138324

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档