Python pocketsphinx 0.1.15 配置与 pocketsphinx

我有一个解决方案(jsgf、dict、hmm),适用于:


pocketsphinx_continuous -hmm zero_ru.cd_cont_4000 -dict vocabular.dict -jsgf calc.jsgf -inmic yes


现在我试图将它移植到 Python pocketsphinx 0.1.15( https://pypi.org/project/pocketsphinx/ ),我看到,在详细的输出中,Pythonpocketsphinx的配置与pocketsphinx_continuous配置不同。


结果,Pythonpocketsphinx进行了很多错误的幻影检测。


我的 Python 脚本非常简单:


speech = LiveSpeech(

    verbose=True,

    hmm='c:/Projects/pocketsphinx-5prealpha-win32/pocketsphinx/bin/Release/x64/zero_ru.cd_cont_4000',

    lm=False,

    jsgf='c:/Projects/pocketsphinx-5prealpha-win32/pocketsphinx/bin/Release/x64/calc.jsgf',

    dic='c:/Projects/pocketsphinx-5prealpha-win32/pocketsphinx/bin/Release/x64/vocabular.dict',

    allphone_ci=False,

    vad_threshold=2.0,

    kws_threshold=1.0,

)


for phrase in speech:

    print(phrase)

通过将文本文件与我看到的输出进行比较,输出中pocketsphinx_continuous有:


INFO: fe_interface.c(325): Using -1 as the seed.

INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none'

INFO: cmn.c(143): mean[0]= 12.00, mean[1..12]= 0.0

INFO: acmod.c(154): Reading linear feature transformation from zero_ru.cd_cont_4000/feature_transform

INFO: mdef.c(518): Reading model definition: zero_ru.cd_cont_4000/mdef

INFO: bin_mdef.c(181): Allocating 145321 * 8 bytes (1135 KiB) for CD tree

但是 Pythonpocketsphinx有:


INFO: fe_interface.c(324): Using -1 as the seed.

INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='batch', VARNORM='no', AGC='none'

INFO: acmod.c(152): Reading linear feature transformation from c:/Projects/pocketsphinx-5prealpha-win32/pocketsphinx/bin/Release/x64/zero_ru.cd_cont_4000/feature_transform

INFO: mdef.c(518): Reading model definition: c:/Projects/pocketsphinx-5prealpha-win32/pocketsphinx/bin/Release/x64/zero_ru.cd_cont_4000/mdef

现在我正在尝试使Pythonpocketsphinx与.configpocketsphinx_continuous


慕田峪7331174
浏览 267回答 1
1回答

梵蒂冈之花

批处理和当前是相同的模式。它只是在某个时间点被重命名,它只取决于版本。幻影检测可能是您的 jsgf 中词汇量非常小的结果,而不是 cmn。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python