1. 安装pocketsphinx
打开链接https://cmusphinx.github.io/wiki/download/
按照以下顺序安装:
1)Sphinxbase
2)Sphinxtrain
3)Pocketsphinx
解压后进入对应文件夹,
./configure
make
make install
安装成功后,采用示例音频文件进行pocketsphinx_continuous语音识别功能检验:
1)cd pocketsphinx-5prealpha/test/data/cards
2)pocketsphinx_continuous -infile 005.wav > 005.result
3)cat 005.result
eight of spades for up close seven of hearts
2. 下载汉语语言包
pocket_sphinx默认是包含英语语言包, 如果想进行汉语识别,需要先下载普通话语言包:
1)打开https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/
2)选择Mandarin
下载加压后没有规定的路径,我个人放在了(和内嵌英语语言包对应):
pocketsphinx-5prealpha/model/zh-cn
README zh_cn.cd_cont_5000