Ubuntu 12.04下編譯安裝Kaldi

來源:互聯網
上載者:User

Ubuntu 12.04下編譯安裝Kaldi

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

OS:Ubuntu 12.04 (amd64)

kaldi的  http://svn.code.sf.net/p/kaldi/code/  我這裡下載的是 stable

svn co http://svn.code.sf.net/p/kaldi/code/stable kaldi-stable

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

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

sph2pipe_v2.5.tar.gz:

wget -T 10 -t 3 http://merlin.fit.vutbr.cz/kaldi/sph2pipe_v2.5.tar.gz

sph2pipe_v2.5.tar.gz:

wget -T 10 -t 3 http://sourceforge.net/projects/kaldi/files/sph2pipe_v2.5.tar.gz

地址修改完成後,可以進行 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 http://svn.code.sf.net/p/kaldi/code/trunk

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下的安裝和編譯 

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.