语音识别实战之Kaldi安装(mac版)

检查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), see windows/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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值