HTK在Ubuntu 9.10下的安装步骤
一、增加台湾的源:
1.sudo gedit /etc/apt/sources.list
编辑你的源列表,将原来的内容全部删除,添加下面列表中的源(注意不要全部添加),复制到你的列表中,然后保存列表。
deb http://tw.archive.ubuntu.com/ubuntu/ karmic main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ karmic-updates universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ karmic-proposed universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ karmic-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ karmic-backports main multiverse restricted universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-proposed universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-backports universe main multiverse restricted
2.sudo aptitude update更新源列表信息
二、安装g++、libx11
sudo apt-get install libc6-dev g++ gccsudo apt-get install libx11-dev
三、安装HTK
下面的安装步骤很简单,按照前假定你已经按照好g++和libx11
> tar xzf HTK-3.4.1.tar.gz
> cd htk
> sudo ./configure –prefix=/usr/local
> sudo make all
> sudo make install
> ls /usr/local/bin
Cluster HERest HLMCopy HQuant HSmooth LGCopy LNewMap
HBuild HHEd HLRescore HRest HVite LGList LNorm
HCompV HInit HLStats HResults LAdapt LGPrep LPlex
HCopy HLEd HMMIRest HSGen LBuild LLink LSubset
HDMan HList HParse HSLab LFoF LMerge
HInit: command not found则没有安装好。
如果出现
USAGE: HInit [options] hmmFile trainFiles…
Option Default
-e f Set convergence factor epsilon 1.0E-4
-i N Set max iterations to N 20
-l s Set segment label to s none
-m N Set min segments needed 3
-n Update hmm (suppress uniform seg) off
-o fn Store new hmm def in fn (name only) outDir/srcfn
-u mvwt Update m)eans v)ars w)ghts t)rans mvwt
-v f Set minimum variance to f 1.0E-2
-w f set mix wt/disc prob floor to f 0.0
-A Print command line arguments off
-B Save HMMs/transforms as binary off
-C cf Set config file to cf default
-D Display configuration variables off
-F fmt Set source data format to fmt as config
-G fmt Set source label format to fmt as config
-H mmf Load HMM macro file mmf
-I mlf Load master label file mlf
-L dir Set input label (or net) dir current
-M dir Dir to write HMM macro files current
-S f Set script file to f none
-T N Set trace flags to N 0
-V Print version information off
-X ext Set input label (or net) file ext lab
则成功安装。
四、例子测试
> tar xzf 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
出现下面结果,测试成功
———————— 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]
==================================================