1. 程式人生 > >kaldi 安裝(編譯)

kaldi 安裝(編譯)

因為同事工作需要 kaldi ,所以安裝過程有點。。。。在此記錄一下折騰的過程

OS:ubuntu 12.04 (amd64)

“ 在編譯之前需要改個 sph2pipe_v2.5.tar.gz 的下載地址,原始碼中的地址一直連線不上,無法下載,需要改成 sourceforge 的地址,奇怪的是其他包的地址都是 sourceforge的,為什麼這個會是http://merlin.fit.vutbr.cz/kaldi/sph2pipe_v2.5.tar.gz  ”

編輯 kaldi-stable/tools/Makefile 將最後面部分的sph2pipe 下載地址改成如下地址

地址修改完成後,可以進行 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 工具,那麼您得下載這個版本的了..... -_-!!


[email protected]:~/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。。。。