Kaldi安装(ubuntu)

前端之家收集整理的这篇文章主要介绍了Kaldi安装(ubuntu)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

git 下载:

  git clone https://github.com/kaldi-asr/kaldi.git kaldi --origin upstream
   cd kaldi
  git pull

我下载目录在~/workspace/build/kaldi

进入kaldi目录 查看 INSTALL文件指导进行安装

go to tools/ and follow INSTALL instructions there.
go to src/ and follow INSTALL instructions there.

进入 tools/ 查看INSTALL 信息

执行 extras/check_dependencies.sh

发现很多没安装(gcc 必须的):

extras/check_dependencies.sh: zlib is not installed.
extras/check_dependencies.sh: automake is not installed.
extras/check_dependencies.sh: autoconf is not installed.
extras/check_dependencies.sh: neither libtoolize nor glibtoolize is installed
extras/check_dependencies.sh: subversion is not installed
extras/check_dependencies.sh: python2.7 is not installed
extras/check_dependencies.sh: we recommend that you run (our best guess):
 sudo apt-get install  zlib1g-dev automake autoconf libtool subversion 
You should probably do: 
 sudo apt-get install libatlas3-base

提示一步一步来就行了:

执行:

sudo apt-get install libatlas3-base 
sudo apt-get install zlib1g-dev automake autoconf libtool subversion
sudo apt-get install python

当出现:extras/check_dependencies.sh: all OK. 表示成功安装

查看cpu核心数目:

nproc --all (我的为4)

执行:

make -j x(x为cpu核心数 :我的是4)

出现:All done OK. 表示成功安装。

进入 src目录 查看install 安装说明:

执行:

./configure --shared

出现:

Could not find {libatlas,libsatlas}.so in any of the obvIoUs places,will most likely try static:
Could not find libatlas.a in any of the generic-Linux places,but we'll try other stuff...

** Failed to configure ATLAS libraries ***
**  ERROR   **
** Configure cannot proceed automatically.
**  If you know that you have ATLAS installed somewhere on your machine,you
** may be able to proceed by replacing [somewhere] in kaldi.mk with a directory.
**  If you have sudo (root) access you could install the ATLAS package on your
** machine,e.g. 'sudo apt-get install libatlas-dev libatlas-base-dev' or
** 'sudo yum install atlas.x86_64' or 'sudo zypper install libatlas3-devel',** or on cygwin,install atlas from the installer GUI; and then run ./configure
** again.
**
**  Otherwise (or if you prefer OpenBLAS for speed),you could go the OpenBLAS
** route: cd to ../tools,type 'extras/install_openblas.sh',cd back to here,** and type './configure  --openblas-root=../tools/OpenBLAS/install'

执行:

sudo apt-get install libatlas-base-dev
执行:

./configure --shared

看到:

SUCCESS

To compile: make clean -j; make depend -j; make -j

表示成功:

执行:

make depend -j 8

make -j 8

出现:Done

表示成功


现在需要验证一下是否安装成功

进入egs目录,用命令cat README.txt查看用例,egs下面包含如voxforge,vystadial_{cz,en},yesno和LDC用例

这里用yesno为例

进入egs/yesno目录,用命令cat README.txt查看yesno数据集介绍,是一个关于Yes/no识别的简单的数据集

进入egs/yesno/s5目录,执行 ./run.sh脚本

出现%WER 0.00 [ 0 / 232,0 ins,0 del,0 sub ] exp/mono0a/decode_test_yesno/wer_10_0.0时,恭喜你,Kaldi安装成功!



参考:https://blog.csdn.net/liahuafu/article/details/79834635

猜你在找的Ubuntu相关文章