htk 语音识别 linux,Linux下安装编译并且测试HTK语音识别库

今天晚上又来了兴致,决定写一个linux下的HTK的安装和测试,如果有人想看windows下的,可以看我之前的那篇博文。

首先前提是要确保自己安装了g++和libx11

sudo apt-get install libx11-dev:i386(libX11.so)

解压HTK-3.4.1.tar.gz

sudo tar xzf HTK-3.4.1.tar.gz       然后:

sudo ./configure --prefix=/usr/local/       出现:

setting

config.status: creating HTKLVRec/Makefile

config.status: WARNING: HTKLVRec/Makefile.in seems to ignore the --datarootdir setting

config.status: creating Makefile

config.status: WARNING: Makefile.in seems to ignore the --datarootdir setting

**************************************************

HTK is now ready to be built.

Type "make all" to build the HTK libraries

and tools.

Then "make install" to install them.

The tools will be installed in /usr/local//bin

Build notes: Language Modelling tools will be

built. HDecode will not be built. You can build

it manually later by running 'make hdecode

install-hdecode'

**************************************************

之后试了几次,都是由于自己的环境的错误给中断了,但是最后用了忽略错误编译成功了。

之后出现:

zhangju@ubuntu:/usr/local/bin$ ls

Cluster HERest HLMCopy HQuant HVite LGList LNorm

HBuild HHEd HLRescore HRest LAdapt LGPrep LPlex

HCompV HInit HLStats HResults LBuild LLink LSubset

HCopy HLEd HMMIRest HSGen LFoF LMerge

HDMan HList HParse HSmooth LGCopy LNewMap 测试命令:

zhangju@ubuntu:/usr/local/bin$ HInit

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 出现以上表示安装成功。

下面测试DEMO:

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 如果出现以下显示:

====================== HTK Results Analysis =======================

Date: Mon Mar 11 16:45:40 2013

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]

=================================================================== 表示HTK工具包安装并测试通过。

这两天写了两篇关于HTK分别在windows和linux环境下安装和编译的文章,下面可能要继续开始钻研如何使用。希望两篇文章对大家有帮助,欢迎互相讨论。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值