检查mac是否安装brew!!!
没有安装可以参考下面链接:
https://blog.csdn.net/weixin_43457608/article/details/116064272
Kaldi不是一个终端用户软件,没有安装包。安装Kaldi指的是编译Kaldi代码以及准备一些必要的工具和运行环境。
Step 1、下载Kaldi源码
git clone https://hub.fastgit.org/kaldi-asr/kaldi.git
Step 2、编译安装
cd kaldi
cat README.md
找到对我们有用的信息如下:
To build the toolkit: see
./INSTALL
. These instructions are valid for UNIX
systems including various flavors of Linux; Darwin; and Cygwin (has not been
tested on more “exotic” varieties of UNIX). For Windows installation
instructions (excluding Cygwin), seewindows/INSTALL
.
cat INSTALL
找到对我们有用的信息如下:
[Option 1 in the following does not apply to native Windows install, see windows/INSTALL or following Option 2]
Option 1 (bash + makefile):
Steps:
(1)
go to tools/ and follow INSTALL instructions there.
(2)
go to src/ and follow INSTALL instructions there.
(1) go to tools/ and follow INSTALL instructions there.
$ cd tools
# 按照提示信息,检查依赖
$ cat INSTALL
安装步骤...
$ extras/check_dependencies.sh
extras/check_dependencies.sh: automake is not installed.
extras/check_dependencies.sh: autoconf is not installed.
extras/check_dependencies.sh: sox is not installed.
extras/check_dependencies.sh: gfortran is not installed
extras/check_dependencies.sh: neither libtoolize nor glibtoolize is installed
extras/check_dependencies.sh: python3 is not installed
extras/check_dependencies.sh: Intel MKL does not seem to be installed.
... Download the installer package for your system from:
... https://software.intel.com/mkl/choose-download
... You can also use other matrix algebra libraries. For information, see:
... http://kaldi-asr.org/doc/matrixwrap.html
extras/check_dependencies.sh: The following prerequisites are missing; install them first:
automake autoconf sox gfortran libtool python3
将没有安装的依赖安装上,
brew install automake
brew install autoconf
brew install sox
......
libtoolize安装参考链接:
https://www.cnblogs.com/dakewei/p/10682596.html
Intel MKL安装
http://kaldi-asr.org/doc/matrixwrap.html
或者:extras/install_mkl.sh(仅Linux)
依赖安装完成后,make
If you have multiple CPUs and want to speed things up, you can do a parallel
build by supplying the “-j” option to make, e.g. to use 4 CPUs
make -j 4
(2) go to src/ and follow INSTALL instructions there.
cd ../src
cat INSTALL
# 运行下面命令
./configure --shared
# -j 多进程make
make depend -j 8
make -j 8
Step3:检查是否安装成功
这是一个语音识别的示例:YESNO,只能识别YSE和NO两个单词。
cd egs/yesno/s5
sh run.sh
测试结果为,%WER表示测试232个词结果全部正确:
%WER 0.00 [ 0 / 232, 0 in , 0 del, 0 ub ] exp/mono0a/decode_te t_ye no/wer_10_1.0