您的位置:首页 > 其它

kaldi安装及运行测试例子

2016-08-20 16:45 357 查看

一、安装

1、安装前的配置

安装前你需要对你的 linux进行配置,你需要安装的软件有:
apt-get,subversion,automake,autoconf,libtool,g++,zlib,libatal,wget
具体安装方法如下:
(1)sudo apt-get install libtoo
(2)sudo apt-get install autoconf
(3)sudo apt-get install wget
(4)sudo apt-get install perl
(5)sudo apt-get install subversion
(6)sudo apt-get install build-essential
(7)sudo apt-get install gfortran
(8)sudo apt-get install libatlas-dev
(9)sudo apt-get install libatlas-base-dev
(10)安装zlib
wget http://www.zlib.net/zlib-1.2.8.tar.gz tar -xvzf zlib-1.2.8.tar.gz
cd zlib-1.2.8.tar.gz
./configure
make

sudo make install

这里注意的是:如果在wget http://www.zlib.net/zlib-1.2.8.tar.gz这一步出问题,可能是a.linux电脑没联网,b.所给的网址有问题
这一步tar -xvzf zlib-1.2.8.tar.gz若出错,尝试改变参数为-xvf,再运行。若仍不行,可能是下载的文件有损坏,重新下载

2、下载kaldi-trunk

1). svn co svn://svn.code.sf.net/p/kaldi/code/trunk kaldi-trunk(一定要注意服务器处于联网状态!)
2).先回到tools目录下,在命令行输入:make。
3).make完后,在src目录下:
./configure
make depend
make

二、测试

1、yesno
1)下载waves_yesno.zip到kaldi-trunk/egs/yesno目录下
2)在yesno/s3目录下运行./run.sh
如若有这样的错误:



这与tar -xvzf zlib-1.2.8.tar.gz命令出错提示一样,说明还是下载的文件有问题。
2、timit
TIMIT数据库由630个话者组成,每个人讲10句,美式英语的8种主要方言。
运行timit的步骤:
1)去run.sh
里修改
timit 的目录,修改为你自己
timit 数据所在的目录;
2)同时修改cmd.sh

path.sh

3)运行run.sh
下面粘贴的是结果:(从RESULTS中看到的)
# Use caution when comparing these results with other published results.

Training Set   : 3696 sentences 4620 sentences

Dev Set        : 400 sentences

Test Set       : 192 sentences Core Test Set (different from Full 1680 sent. set)

Language Model : Bigram phoneme language model which is extracted from training set

Phone mapping  : Training with 48 phonemes, for testing mapped to 39 phonemes

# monophone, deltas.

---------------------------------Dev Set------------------------------------------

%WER 31.7 | 400 15057 | 71.8 19.5 8.7 3.5 31.7 100.0 | -0.457 | exp/mono/decode_dev/score_5/ctm_39phn.filt.sys

--------------------------------Test Set------------------------------------------

%WER 32.7 | 192 7215 | 70.5 19.8 9.6 3.2 32.7 100.0 | -0.482 | exp/mono/decode_test/score_5/ctm_39phn.filt.sys

# tri1 : first triphone system  (delta+delta-delta features)

---------------------------------Dev Set------------------------------------------

%WER 25.1 | 400 15057 | 78.9 15.9 5.2 4.0 25.1 99.8 | -0.178 | exp/tri1/decode_dev/score_10/ctm_39phn.filt.sys

--------------------------------Test Set------------------------------------------

%WER 25.6 | 192 7215 | 78.3 15.9 5.8 3.9 25.6 100.0 | -0.129 | exp/tri1/decode_test/score_10/ctm_39phn.filt.sys

# tri2 : an LDA+MLLT system

---------------------------------Dev Set------------------------------------------

%WER 23.0 | 400 15057 | 80.7 14.6 4.7 3.7 23.0 99.5 | -0.230 | exp/tri2/decode_dev/score_10/ctm_39phn.filt.sys

--------------------------------Test Set------------------------------------------

%WER 23.7 | 192 7215 | 80.0 14.8 5.2 3.7 23.7 99.5 | -0.284 | exp/tri2/decode_test/score_10/ctm_39phn.filt.sys

# tri3 : Speaker Adaptive Training (SAT) system

#!/bin/bash

exit 0

Phone mapping  : Training with 48 phonemes, for testing mapped to 39 phonemes

# SGMM2 Training :

# bMMI not helpful here...

# Hybrid System (Dans DNN):

# Hybrid System (Karel's DNN), sMBR training
%WER 17.3 | 400 15057 | 85.4 10.7 3.9 2.7 17.3 98.5 | -0.380 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it6/score_7/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.6 | 192 7215 | 84.2 11.1 4.7 2.8 18.6 100.0 | -0.816 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.8 | 192 7215 | 84.7 11.4 3.9 3.5 18.8 100.0 | -0.819 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it6/score_5/ctm_39phn.filt.sys
# sMBR not helpful here...

# Combination SGMM + Dans DNN:
---------------------------------Dev Set------------------------------------------
%WER 16.7 | 400 15057 | 86.0 10.9 3.1 2.7 16.7 99.5 | -0.102 | exp/combine_2/decode_dev_it1/score_6/ctm_39phn.filt.sys
%WER 16.7 | 400 15057 | 86.4 10.8 2.8 3.1 16.7 99.5 | -0.248 | exp/combine_2/decode_dev_it2/score_5/ctm_39phn.filt.sys
%WER 16.8 | 400 15057 | 85.8 10.9 3.3 2.6 16.8 99.3 | -0.013 | exp/combine_2/decode_dev_it3/score_7/ctm_39phn.filt.sys
%WER 16.9 | 400 15057 | 86.2 11.0 2.8 3.1 16.9 99.8 | -0.240 | exp/combine_2/decode_dev_it4/score_5/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.4 | 192 7215 | 84.6 12.0 3.5 3.0 18.4 99.0 | -0.223 | exp/combine_2/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.5 12.1 3.4 3.0 18.5 99.0 | -0.215 | exp/combine_2/decode_test_it2/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.4 12.0 3.7 2.9 18.5 99.0 | -0.074 | exp/combine_2/decode_test_it3/score_6/ctm_39phn.filt.sys
%WER 18.6 | 192 7215 | 84.9 12.0 3.1 3.6 18.6 99.0 | -0.451 | exp/combine_2/decode_test_it4/score_4/ctm_39phn.filt.sys

%WER 17.3 | 400 15057 | 85.5 10.6 4.0 2.7 17.3 98.5 | -0.696 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it1/score_5/ctm_39phn.filt.sys
%WER 17.3 | 400 15057 | 85.4 10.7 3.9 2.7 17.3 98.5 | -0.380 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it6/score_7/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.6 | 192 7215 | 84.2 11.1 4.7 2.8 18.6 100.0 | -0.816 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.8 | 192 7215 | 84.7 11.4 3.9 3.5 18.8 100.0 | -0.819 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it6/score_5/ctm_39phn.filt.sys
# sMBR not helpful here...

# Combination SGMM + Dans DNN:
---------------------------------Dev Set------------------------------------------
%WER 16.7 | 400 15057 | 86.0 10.9 3.1 2.7 16.7 99.5 | -0.102 | exp/combine_2/decode_dev_it1/score_6/ctm_39phn.filt.sys
%WER 16.7 | 400 15057 | 86.4 10.8 2.8 3.1 16.7 99.5 | -0.248 | exp/combine_2/decode_dev_it2/score_5/ctm_39phn.filt.sys
%WER 16.8 | 400 15057 | 85.8 10.9 3.3 2.6 16.8 99.3 | -0.013 | exp/combine_2/decode_dev_it3/score_7/ctm_39phn.filt.sys
%WER 16.9 | 400 15057 | 86.2 11.0 2.8 3.1 16.9 99.8 | -0.240 | exp/combine_2/decode_dev_it4/score_5/ctm_39phn.filt.sys

-----------------------------
d089
---Test Set------------------------------------------
%WER 18.4 | 192 7215 | 84.6 12.0 3.5 3.0 18.4 99.0 | -0.223 | exp/combine_2/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.5 12.1 3.4 3.0 18.5 99.0 | -0.215 | exp/combine_2/decode_test_it2/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.4 12.0 3.7 2.9 18.5 99.0 | -0.074 | exp/combine_2/decode_test_it3/score_6/ctm_39phn.filt.sys
%WER 18.6 | 192 7215 | 84.9 12.0 3.1 3.6 18.6 99.0 | -0.451 | exp/combine_2/decode_test_it4/score_4/ctm_39phn.filt.sys

%WER 17.3 | 400 15057 | 85.4 10.7 3.9 2.7 17.3 98.5 | -0.380 | exp/dnn4_pretrr

ain-dbn_dnn_smbr/decode_dev_it6/score_7/ctm_39phn.filt.sys

--------------------------------Test Set-------------------------------------------

%WER 18.6 | 192 7215 | 84.2 11.1 4.7 2.8 18.6 100.0 | -0.816 | exp/dnn4_pretrr

ain-dbn_dnn_smbr/decode_test_it1/score_5/ctm_39phn.filt.sys

%WER 18.8 | 192 7215 | 84.7 11.4 3.9 3.5 18.8 100.0 | -0.819 | exp/dnn4_pretrr

ain-dbn_dnn_smbr/decode_test_it6/score_5/ctm_39phn.filt.sys

# sMBR not helpful here...

# Combination SGMM + Dans DNN:
---------------------------------Dev Set-------------------------------------------

%WER 16.7 | 400 15057 | 86.0 10.9 3.1 2.7 16.7 99.5 | -0.102 | exp/combine_2//
decode_dev_it1/score_6/ctm_39phn.filt.sys
%WER 16.7 | 400 15057 | 86.4 10.8 2.8 3.1 16.7 99.5 | -0.248 | exp/combine_2//
decode_dev_it2/score_5/ctm_39phn.filt.sys
%WER 16.8 | 400 15057 | 85.8 10.9 3.3 2.6 16.8 99.3 | -0.013 | exp/combine_2//
decode_dev_it3/score_7/ctm_39phn.filt.sys
%WER 16.9 | 400 15057 | 86.2 11.0 2.8 3.1 16.9 99.8 | -0.240 | exp/combine_2//
decode_dev_it4/score_5/ctm_39phn.filt.sys

--------------------------------Test Set------------------------------------------

%WER 18.4 | 192 7215 | 84.6 12.0 3.5 3.0 18.4 99.0 | -0.223 | exp/combine_2/dd
ecode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.5 12.1 3.4 3.0 18.5 99.0 | -0.215 | exp/combine_2/dd
ecode_test_it2/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.4 12.0 3.7 2.9 18.5 99.0 | -0.074 | exp/combine_2/dd
ecode_test_it3/score_6/ctm_39phn.filt.sys
%WER 18.6 | 192 7215 | 84.9 12.0 3.1 3.6 18.6 99.0 | -0.451 | exp/combine_2/dd
ecode_test_it4/score_4/ctm_39phn.filt.sys

%WER 17.3 | 400 15057 | 85.5 10.6 4.0 2.7 17.3 98.5 | -0.696 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it1/score_5/ctm_39phn.filt.sys
%WER 17.3 | 400 15057 | 85.4 10.7 3.9 2.7 17.3 98.5 | -0.380 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it6/score_7/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.6 | 192 7215 | 84.2 11.1 4.7 2.8 18.6 100.0 | -0.816 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.8 | 192 7215 | 84.7 11.4 3.9 3.5 18.8 100.0 | -0.819 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it6/score_5/ctm_39phn.filt.sys
# sMBR not helpful here...

# Combination SGMM + Dans DNN:
---------------------------------Dev Set------------------------------------------
%WER 16.7 | 400 15057 | 86.0 10.9 3.1 2.7 16.7 99.5 | -0.102 | exp/combine_2/decode_dev_it1/score_6/ctm_39phn.filt.sys
%WER 16.7 | 400 15057 | 86.4 10.8 2.8 3.1 16.7 99.5 | -0.248 | exp/combine_2/decode_dev_it2/score_5/ctm_39phn.filt.sys
%WER 16.8 | 400 15057 | 85.8 10.9 3.3 2.6 16.8 99.3 | -0.013 | exp/combine_2/decode_dev_it3/score_7/ctm_39phn.filt.sys
%WER 16.9 | 400 15057 | 86.2 11.0 2.8 3.1 16.9 99.8 | -0.240 | exp/combine_2/decode_dev_it4/score_5/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.4 | 192 7215 | 84.6 12.0 3.5 3.0 18.4 99.0 | -0.223 | exp/combine_2/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.5 12.1 3.4 3.0 18.5 99.0 | -0.215 | exp/combine_2/decode_test_it2/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.4 12.0 3.7 2.9 18.5 99.0 | -0.074 | exp/combine_2/decode_test_it3/score_6/ctm_39phn.filt.sys
%WER 18.6 | 192 7215 | 84.9 12.0 3.1 3.6 18.6 99.0 | -0.451 | exp/combine_2/decode_test_it4/score_4/ctm_39phn.filt.sys

%WER 17.3 | 400 15057 | 85.4 10.7 3.9 2.7 17.3 98.5 | -0.380 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it6/score_7/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.6 | 192 7215 | 84.2 11.1 4.7 2.8 18.6 100.0 | -0.816 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.8 | 192 7215 | 84.7 11.4 3.9 3.5 18.8 100.0 | -0.819 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it6/score_5/ctm_39phn.filt.sys
# sMBR not helpful here...

# Combination SGMM + Dans DNN:
---------------------------------Dev Set------------------------------------------
%WER 16.7 | 400 15057 | 86.0 10.9 3.1 2.7 16.7 99.5 | -0.102 | exp/combine_2/decode_dev_it1/score_6/ctm_39phn.filt.sys
%WER 16.7 | 400 15057 | 86.4 10.8 2.8 3.1 16.7 99.5 | -0.248 | exp/combine_2/decode_dev_it2/score_5/ctm_39phn.filt.sys
%WER 16.8 | 400 15057 | 85.8 10.9 3.3 2.6 16.8 99.3 | -0.013 | exp/combine_2/decode_dev_it3/score_7/ctm_39phn.filt.sys
%WER 16.9 | 400 15057 | 86.2 11.0 2.8 3.1 16.9 99.8 | -0.240 | exp/combine_2/decode_dev_it4/score_5/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.4 | 192 7215 | 84.6 12.0 3.5 3.0 18.4 99.0 | -0.223 | exp/combine_2/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.5 12.1 3.4 3.0 18.5 99.0 | -0.215 | exp/combine_2/decode_test_it2/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.4 12.0 3.7 2.9 18.5 99.0 | -0.074 | exp/combine_2/decode_test_it3/score_6/ctm_39phn.filt.sys
%WER 18.6 | 192 7215 | 84.9 12.0 3.1 3.6 18.6 99.0 | -0.451 | exp/combine_2/decode_test_it4/score_4/ctm_39phn.filt.sys

# SGMM2 Training :

# bMMI not helpful here...

# Hybrid System (Dans DNN):

# Hybrid System (Karel's DNN), sMBR training
%WER 17.3 | 400 15057 | 85.4 10.7 3.9 2.7 17.3 98.5 | -0.380 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it6/score_7/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.6 | 192 7215 | 84.2 11.1 4.7 2.8 18.6 100.0 | -0.816 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.8 | 192 7215 | 84.7 11.4 3.9 3.5 18.8 100.0 | -0.819 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it6/score_5/ctm_39phn.filt.sys
# sMBR not helpful here...

# Combination SGMM + Dans DNN:
---------------------------------Dev Set------------------------------------------
%WER 16.7 | 400 15057 | 86.0 10.9 3.1 2.7 16.7 99.5 | -0.102 | exp/combine_2/decode_dev_it1/score_6/ctm_39phn.filt.sys
%WER 16.7 | 400 15057 | 86.4 10.8 2.8 3.1 16.7 99.5 | -0.248 | exp/combine_2/decode_dev_it2/score_5/ctm_39phn.filt.sys
%WER 16.8 | 400 15057 | 85.8 10.9 3.3 2.6 16.8 99.3 | -0.013 | exp/combine_2/decode_dev_it3/score_7/ctm_39phn.filt.sys
%WER 16.9 | 400 15057 | 86.2 11.0 2.8 3.1 16.9 99.8 | -0.240 | exp/combine_2/decode_dev_it4/score_5/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.4 | 192 7215 | 84.6 12.0 3.5 3.0 18.4 99.0 | -0.223 | exp/combine_2/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.5 12.1 3.4 3.0 18.5 99.0 | -0.215 | exp/combine_2/decode_test_it2/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.4 12.0 3.7 2.9 18.5 99.0 | -0.074 | exp/combine_2/decode_test_it3/score_6/ctm_39phn.filt.sys
%WER 18.6 | 192 7215 | 84.9 12.0 3.1 3.6 18.6 99.0 | -0.451 | exp/combine_2/decode_test_it4/score_4/ctm_39phn.filt.sys

%WER 17.3 | 400 15057 | 85.5 10.6 4.0 2.7 17.3 98.5 | -0.696 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it1/score_5/ctm_39phn.filt.sys
%WER 17.3 | 400 15057 | 85.4 10.7 3.9 2.7 17.3 98.5 | -0.380 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_dev_it6/score_7/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.6 | 192 7215 | 84.2 11.1 4.7 2.8 18.6 100.0 | -0.816 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.8 | 192 7215 | 84.7 11.4 3.9 3.5 18.8 100.0 | -0.819 | exp/dnn4_pretrain-dbn_dnn_smbr/decode_test_it6/score_5/ctm_39phn.filt.sys
# sMBR not helpful here...

# Combination SGMM + Dans DNN:
---------------------------------Dev Set------------------------------------------
%WER 16.7 | 400 15057 | 86.0 10.9 3.1 2.7 16.7 99.5 | -0.102 | exp/combine_2/decode_dev_it1/score_6/ctm_39phn.filt.sys
%WER 16.7 | 400 15057 | 86.4 10.8 2.8 3.1 16.7 99.5 | -0.248 | exp/combine_2/decode_dev_it2/score_5/ctm_39phn.filt.sys
%WER 16.8 | 400 15057 | 85.8 10.9 3.3 2.6 16.8 99.3 | -0.013 | exp/combine_2/decode_dev_it3/score_7/ctm_39phn.filt.sys
%WER 16.9 | 400 15057 | 86.2 11.0 2.8 3.1 16.9 99.8 | -0.240 | exp/combine_2/decode_dev_it4/score_5/ctm_39phn.filt.sys
--------------------------------Test Set------------------------------------------
%WER 18.4 | 192 7215 | 84.6 12.0 3.5 3.0 18.4 99.0 | -0.223 | exp/combine_2/decode_test_it1/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.5 12.1 3.4 3.0 18.5 99.0 | -0.215 | exp/combine_2/decode_test_it2/score_5/ctm_39phn.filt.sys
%WER 18.5 | 192 7215 | 84.4 12.0 3.7 2.9 18.5 99.0 | -0.074 | exp/combine_2/decode_test_it3/score_6/ctm_39phn.filt.sys
%WER 18.6 | 192 7215 | 84.9 12.0 3.1 3.6 18.6 99.0 | -0.451 | exp/combine_2/decode_test_it4/score_4/ctm_39phn.filt.sys
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  kaldi timit yesno