Linux 使用 pocketsphinx 做中文语音识别

2019-01-02  本文已影响57人  kongxx

前一篇博客说了一下怎么在 Windows 平台使用 pocketsphinx 做中文语音识别,今天看看在 Linux 上怎办实现。

由于 pocketsphinx 没有提供 Linux 的二进制包,因此我们需要自己根据源码编译。

下载

从下面地址下载源代码

https://sourceforge.net/projects/cmusphinx/files/

这里,我使用的是 sphinxbase-5prealpha.tar.gz 和 pocketsphinx-5prealpha.tar.gz。

编译

下载模型文件

模型文件下载地址

https://sourceforge.net/projects/cmusphinx/files/Acoustic and Language Models/
其中 Mandarin 为中文普通话,下载之后我们可以看到

测试中文语音识别

pocketsphinx\bin\Release\x64\pocketsphinx_continuous.exe -hmm zh_broadcastnews_ptm256_8000 -lm zh_broadcastnews_64000_utf8.DMP -dict zh_broadcastnews_utf8.dic -infile myfile-16000.wav > myfile.txt
上一篇 下一篇

猜你喜欢

热点阅读