素材:
Ubuntu 14.04
x64
HTK-3.4.1
1.下载Linux版本的HTK
访问HTK官网(http://htk.eng.cam.ac.uk/download.shtml),注册并登陆后下载Linux版本的HTK source code和HTK samples
2.安装x11
sudo apt-get install libx11-dev
3.安装g++
sudo apt-get install g++
4.安装HTK
tar -zxvf HTK-3.4.1.tar.gz
cd htk
sudo ./configure --prefix=/tmp
sudo make all
5.此时出现错误:fatal error: sys/cdefs.h解决方法如下:
export C_INCLUDE_PATH={/usr/include/x86_64-linux-gnu}:%C_INCLUDE_PATH
6.安装libc-dev-i386
sudo apt-get install libc6-dev-i386
7.再次make all
sudo make all
8.出现错误:/usr/bin/ld: cannot find -lX11
解决方法如下:
sudo ./configure --without-x --disable-hslab
9.再次make all
sudo make all
10.终于可以make install了
sudo make install
11.设置路径
PATH="$PATH:/tmp/bin:."
export PATH
12.测试HTKDemo
tar -zxvf HTK-samples-3.4.1.tar.gz
cd samples
cd HTKDemo
mkdir -p hmms/{tmp,hmm.{0,1,2,3}} proto acc test
perl runDemo configs/monPlainM1S1.dcf
13.得出测试结果
--------------------- Overall Results -----------------------
SENT: %Correct=0.00 [H=0, S=3, N=3]
WORD: %Corr=63.91, Acc=59.40 [H=85, D=35, S=13, I=6, N=133]
=======================================================