1、首先需要安装一些32位库
sudo apt-get install libx11-dev:i386 libx11-dev
sudo apt-get install g++-multilib
sudo apt-get install osspd
2.下载HTK src和samples
http://htk.eng.cam.ac.uk/(测试可行版本为3.4.1)
3.解压,进入解压后的文件夹
./configure --prefix=/to/path 改为自己想安装的位置;例如./configure --prefix=/home/abc/htk;
make all (make all -j8/-j4)
#for ubuntu 15.04 //Modify “HLMTools/Makefile, not “HTMTools/Makefile” or root “Makefile“.
#line 77: replace with: if [ ! -d $(bindir) -a X_ = X_yes ] ; then mkdir -p $(bindir) ; fi (或者将此行前面的空格删除,再按tab键对齐;)
make install
4、添加环境变量
sudo gedit /etc/profile
最后一行加入
export PATH="$PATH:/安装文件路径",例如export PATH="$PATH:/home/abc/htk/bin",
保存后source /etc/profile 使更改生效,
5,测试
cd ../samples/HTKDemo
#test:
mkdir -p hmms/{tmp,hmm.{0,1,2,3}} proto acc test
perl runDemo configs/monPlainM1S1.dcf
结果为
====================== HTK Results Analysis =======================
Date: Tue Apr 26 09:40:41 2016
Ref : labels/bcplabs/mon
Rec : test/te1.rec
: test/te2.rec
: test/te3.rec
------------------------ 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]
这个是从CSDN上看到一个同学的操作,我按照该步骤操作是能完全解决问题,所以留个笔记.
参考文档:
1 https://blog.csdn.net/ylyadyam/article/details/51247843