【问题标题】:pocketsphinx python gstreamer audio ratepocketsphinx python gstreamer 音频速率
【发布时间】:2013-05-30 17:39:11
【问题描述】:

我在 linux 上使用 pocketsphinx,并且一直在使用 CMU 教程中的源代码。我正在尝试上传 HUB4 字典、语言模型和声学模型。

我之前刚上传字典和语言模型时可以正常工作,但是当我尝试使用声学模型时出现此错误:

INFO:acmod.c(246):从 /home/mintea/programs/hub4/hub4opensrc.cd_continuous_8gau/feat.params 解析模型特定的特征参数 FATAL_ERROR:“fe_sigproc.c”,第 405 行:无法创建滤波器组,频率范围不匹配。采样率 8000.000000,FFT 大小 512,lowerf 5734.375000 upperf 5078.125000。

这是我正在使用的代码的 sn-p:

self.pipeline = gst.parse_launch('gconfaudiosrc ! audioconvert ! audioresample '
                                     + '! vader name=vad auto-threshold=true '
                                     + '! pocketsphinx name=asr ! fakesink')

asr = self.pipeline.get_by_name('asr')
asr.connect('partial_result', self.asr_partial_result)
asr.connect('result', self.asr_result)
asr.set_property('hmm', '/home/mintea/programs/hub4/hub4opensrc.cd_continuous_8gau')
asr.set_property('lm', '/home/mintea/programs/hub4/language_model.arpaformat.DMP')
asr.set_property('dict', '/home/mintea/programs/hub4/cmudict.hub4.06d.dic')        
asr.set_property('configured', True)

我认为在我配置的 gst.parse_launch 调用中有一个标志用于更改音频速率,但我不太确定如何。有什么建议么?谢谢!

【问题讨论】:

    标签: python linux audio gstreamer cmusphinx


    【解决方案1】:

    您不能将 hub4 声学模型与 gstreamer 插件一起使用。它需要 16000 的采样率,而 8000 的采样率是在 gstreamer 插件源中硬编码的。

    你需要在gstreamer插件源中多处将8000改为16000并重新编译插件或者你需要使用8khz声学模型。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-02
      相关资源
      最近更新 更多