Ubuntu 12.04下编译安装Kaldi

因为同事工作需要 kaldi ,所以安装过程有点麻烦。在此记录一下折腾的过程。

OS:Ubuntu 12.04 (amd64)

kaldi的下载地址    我这里下载的是 stable

svn co kaldi-stable

“ 在编译之前需要改个 sph2pipe_v2.5.tar.gz 的下载地址,源码中的地址一直连接不上,无法下载,需要改成 sourceforge 的地址,奇怪的是其他包的地址都是 sourceforge的,为什么这个会是  ”

编辑 kaldi-stable/tools/Makefile 将最后面部分的sph2pipe 下载地址改成如下地址

sph2pipe_v2.5.tar.gz:

wget -T 10 -t 3

sph2pipe_v2.5.tar.gz:

wget -T 10 -t 3

地址修改完成后,可以进行 make 了

cd kaldi-stable/tools

make  会自动去下载相应软件包、然后解压等等操作,除非中间出错,否则不用干预

出错了。。。。。由于之前用不到 automake autoconf libtool 工具,在进行到 irstlm 这一步时出错了。。。安装刚才提到的三个软件 automake autoconf libtool

patching file src/lmtable.h
patching file src/interpolate-lm.cpp
touch irstlm/.patched
cd irstlm; \
                (./regenerate-makefiles.sh || ./regenerate-makefiles.sh) && \
                ./configure --prefix `pwd`
Calling
Calling ...
./regenerate-makefiles.sh: line 52: -I: command not found
aclocal failed
Calling
Calling ...
./regenerate-makefiles.sh: line 52: -I: command not found
aclocal failed

安装依赖

aptitude install automake autoconf libtool -y

继续make。。。。

make clean

make -j4

cd ../src

./configure

make -j4

-------------------------------------------------------------------------

如果您需要  nnetbin 工具,那么您得下载这个版本的了..... -_-!!

svn co

root@GPU:~/kaldi-trunk/src# ./configure
Configuring ...
Checking OpenFST library in /root/kaldi-trunk/tools/openfst ...
Checking OpenFst library was patched.
Backing up kaldi.mk to kaldi.mk.bak
Doing OS specific configurations ...
On Linux: Checking for linear algebra header files ...
Using ATLAS as the linear algebra library.
Atlas found in /usr/lib
... no libatlas.so in /usr/lib/atlas
... no libatlas.so in /usr/lib/atlas-sse2
... no libatlas.so in /usr/lib/atlas-sse3
... no libatlas.so in /usr/lib64
... no libatlas.so in /usr/lib64/atlas
... no libatlas.so in /usr/lib64/atlas-sse2
... no libatlas.so in /usr/lib64/atlas-sse3
... no libatlas.so in /usr/local/lib
... no libatlas.so in /usr/local/lib/atlas
... no libatlas.so in /usr/local/lib/atlas-sse2
... no libatlas.so in /usr/local/lib/atlas-sse3
... no libatlas.so in /usr/local/lib64
... no libatlas.so in /usr/local/lib64/atlas
... no libatlas.so in /usr/local/lib64/atlas-sse2
... no libatlas.so in /usr/local/lib64/atlas-sse3
... no libatlas.so in /root/kaldi-trunk/src/../tools/ATLAS/build/install/lib/
... no libatlas.so in /root/kaldi-trunk/tools/ATLAS/lib
Looking for ATLAS libs in /usr/lib
Using library -L/usr/lib -llapack as ATLAS's CLAPACK library.
Using CUDA toolkit /usr/local/cuda (nvcc compiler and runtime libraries)
Static=[false] Speex library not found: You can still build Kaldi without Speex.
Successfully configured for Linux [dynamic libraries] with ATLASLIBS =-L/usr/lib -llapack -lcblas -latlas -lf77blas
exp() time: 0.00276494
expf() time: 0.00307679
*** WARNING: expf() seems to be slower than exp() on your machine. This is a known bug in old versions of glibc. Please consider updating glibc. ***
*** Kaldi will be configured to use exp() instead of expf() in base/kaldi-math.h Exp() routine for single-precision floats. ***

关于那个gblic的提示,不知道是不是一定要升级glibc。

Linux升级Glibc 

Kaldi语音识别库在Linux下的安装和编译 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/16188.html