kaldi windows安装_Kaldi安装
AI
人工智能
Kaldi安装
Kaldi是基于C++开发并遵守Apache License v2.0的一款语音识别工具包,是目前最流行的ASR工具之一,本文基于Ubuntu 18.04 LTS介绍了如何安装Kaldi。
首先按照官网提示,将Kaldi项目克隆至本地:
~$ git clone https://github.com/kaldi-asr/kaldi.git kaldi-trunk --origin golden
进入kaldi-trunk:
~$ cd kaldi-trunk
~/kaldi-trunk$
查看INSTALL:
~/kaldi-trunk$ cat INSTALL
This is the official Kaldi INSTALL. Look also at INSTALL.md for the git mirror installation.
[for native Windows install, see windows/INSTALL]
(1)
go to tools/ and follow INSTALL instructions there.
(2)
go to src/ and follow INSTALL instructions there.
所以先进入tools目录按提示安装,再进入src目录按提示安装。
进入tools目录查看INSTALL:
~/kaldi-trunk$ cd tools
~/kaldi-trunk/tools$ cat INSTALL
To check the prerequisites for Kaldi, first run
extras/check_dependencies.sh
and see if there are any system-level installations you need to do. Check the
output carefully. There are some things that will make your life a lot easier
if you fix them at this stage. If your system default C++ compiler is not
supported, you can do the check with another compiler by setting the CXX
environment variable, e.g.
CXX=g++-4.8 extras/check_dependencies.sh
Then run
make
which by default will install ATLAS headers, OpenFst, SCTK and sph2pipe.
OpenFst requires a relatively recent C++ compiler with C++11 support, e.g.
g++ >= 4.7, Apple clang >= 5.0 or LLVM clang >= 3.3. If your system default
compiler does not have adequate support for C++11, you can specify a C++11
compliant compiler as a command argument, e.g.
make CXX=g++-4.8
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
In extras/, there are also various scripts to install extra bits and pieces that
are used by individual example scripts. If an example script needs you to run
one of those scripts, it will tell you what to do.
所以首先需要进入extras目录运行脚本check_dependencies.sh来检查各种依赖是否安装。
进入extras并运行check_dependencies.sh:
~/kaldi-trunk/tools$ cd extras/
~/kaldi-trunk/tools/extras$ ./check_dependencies.sh
./check_dependencies.sh: all OK.
运行check_dependencies.sh后出现任何提示表明某些库未安装,都应按照提示解决,直到运行check_dependencies.sh后出现如上所示”./check_dependencies.sh: all OK.”。
然后进入上一级,进行编译:
~/kaldi-trunk/tools/extras$ cd ..
~/kaldi-trunk/tools$ make
如果是在虚拟机上,建议使用make而非make -j 4,否则很容易内存不够导致编译失败,之后在src目录下的编译也一样。
make完成后可能会提示irstlm未安装,此时不用管,先继续完成整个kaldi的安装再说。
进入src目录并查看INSTALL:
~/kaldi-trunk/tools$ cd ../src
~/kaldi-trunk/src$ cat INSTALL
These instructions are valid for UNIX-like systems (these steps have
been run on various Linux distributions; Darwin; Cygwin). For native Windows
compilation, see ../windows/INSTALL.
You must first have completed the installation steps in ../tools/INSTALL
(compiling OpenFst; getting ATLAS and CLAPACK headers).
The installation instructions are
./configure --shared
make depend -j 8
make -j 8
Note that we added the "-j 8" to run in parallel because "make" takes a long
time. 8 jobs might be too many for a laptop or small desktop machine with not
many cores.
For more information, see documentation at http://kaldi-asr.org/doc/
and click on "The build process (how Kaldi is compiled)".
运行configure且不要添加参数”– –shared”:
~/kaldi-trunk/src$ ./configure
Configuring ...
Backing up kaldi.mk to kaldi.mk.bak ...
Checking compiler g++ ...
Checking OpenFst library in /home/zillyrex/kaldi-trunk/tools/openfst ...
Doing OS specific configurations ...
On Linux: Checking for linear algebra header files ...
Using ATLAS as the linear algebra library.
Atlas found in /usr/lib/x86_64-linux-gnu
Validating presence of ATLAS libs in /usr/lib/x86_64-linux-gnu
Using library /usr/lib/x86_64-linux-gnu/liblapack.so as ATLAS's CLAPACK library.
CUDA will not be used! If you have already installed cuda drivers
and cuda toolkit, try using --cudatk-dir=... option. Note: this is
only relevant for neural net experiments
Info: configuring Kaldi not to link with Speex (don't worry, it's only needed if you
intend to use 'compress-uncompress-speex', which is very unlikely)
Successfully configured for Linux [dynamic libraries] with ATLASLIBS =/usr/lib/x86_64-linux-gnu/liblapack.so /usr/lib/x86_64-linux-gnu/libcblas.so /usr/lib/x86_64-linux-gnu/libatlas.so /usr/lib/x86_64-linux-gnu/libf77blas.so
SUCCESS
To compile: make clean -j; make depend -j; make -j
... or e.g. -j 10, instead of -j, to use a specified number of CPUs
务必仔细阅读运行configure后显示的提示,它可能和上文所示的内容有所区别,其中提醒了你有哪些东西没安装好,并给出了指导,遵循那些执导完成相关依赖的安装,直到运行configure后出现如上文所示的提示,提示的最后显示”SUCCESS To compile: ……”,此时才能进行后面的步骤,否则长时间的make后会报错。
执行最后的步骤,编译kaldi的源码:
~/kaldi-trunk/src$ make depend
...
...
~/kaldi-trunk/src$ make
...
...
...
Done
make的时间较长,大约半个小时到一个小时,如果编译过程中未出现红色的error,最后出现”Done”,表明编译成功。
最后运行一个例程来检验安装是否成功,运行egs/yesno/s5目录下的run.sh:
~/kaldi-trunk/src$ cd ../egs/yesno/s5/
~/kaldi-trunk/egs/yesno/s5$ ./run.sh
Preparing train and test data
Dictionary preparation succeeded
utils/prepare_lang.sh --position-dependent-phones false data/local/dict data/local/lang data/lang
Checking data/local/dict/silence_phones.txt ...
--> reading data/local/dict/silence_phones.txt
--> text seems to be UTF-8 or ASCII, checking whitespaces
--> text contains only allowed whitespaces
--> data/local/dict/silence_phones.txt is OK
...
...
...
local/score.sh: scoring with word insertion penalty=0.0,0.5,1.0
%WER 0.00 [ 0 / 232, 0 ins, 0 del, 0 sub ] exp/mono0a/decode_test_yesno/wer_10_0.0
出现如上结果,表明kaldi安装成功。
内容来源于网络,如有侵权请联系客服删除
kaldi windows安装_Kaldi安装相关推荐
- kaldi windows安装_kaldi 在 Windows 下的使用
其实不是特别推荐在 Windows 下使用 kaldi,因为在 egs 下所有的脚本都无法运行,我也是弄了很久才在 Windows 下配置好 kaldi,都一度差点弃坑.就连官方也说There is ...
- Redis进阶实践之三如何在Windows系统上安装安装Redis
一.Redis的简介 Redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合).zset( ...
- windows 7下安装VS2005,SQL Server2005,VS2008
最近电脑安装了windows 7操作系统,开发工具VS2005,VS2008和SQL Server2005需要重新安装,对这些工具在windows 7下的兼容性起初也存在疑问,经过一番努力,这些软件终 ...
- windows node.js 安装
最近基础到vue 看到vue-cli 我以前是用vue.js 文件渲染前台的文件 那么vue-cli是干嘛的啊 带着疑问,带着好奇,我看到了一篇博客 https://blog.csdn.net/muz ...
- windows上python3安装
下载python 下载地址 https://www.python.org/downloads/windows/ image.png 安装python 1.添加python到环境变量 image.png ...
- 活动目录实战之一 windows 2008 r2 安装域中第一台域控制器
windows 2008R2已经出来很长时间了,想写一下关于活动目录的一些知识.例如:我们应该如何安装域内第一台域控制器呢,找了很多文章,觉得胖哥这篇文章写的非常好,图文并茂,并且把原理讲的也非常清楚 ...
- 在Windows 7下安装Oracle 11g的解决方法
在Windows 7下安装Oracle 11g的解决方法 前不久卸载掉了自己的Windows Vista系统,装上了Windows7 旗舰版,在装机过程中也遇到了很多问题,有些问题是自己不曾遇到过的, ...
- Windows下RabbitMQ安装及注意事项
Windows下RabbitMQ安装及注意事项 简介 背景 1. RabbitMQ是一个由erlang开发的AMQP(Advanved Message Queue)的开源实现. Rabbit ...
- windows系统上安装与使用Android NDK
转自http://www.cnblogs.com/luxiaofeng54/archive/2011/02/12/1952391.html 很早就听说了android的NDK应用,只是一直没有时间去研 ...
最新文章
- Android Studio -添加你见过的最牛Log*神器*
- ASP.NET Web API中的参数绑定总结
- Java对二叉树的操作
- gre biochemistry_【备考精选】2020年11月6日GRE写作Issue预测分享
- Asp.Net Core 已支持 gRPC-Web !!
- c++ 怎样连接两个链表_LeetCode | 链表的入口,一文帮你搞定“环形链表”(python版,最简单解析)...
- python中的随机函数random
- vue页面锚文本_Vue如何实现锚点定位功能?
- 法国电信:5G加速数字化落地 物联网是首座金矿
- 单片机 MSP430 G2553 F5529 蜂鸣器 音乐 音乐播放器
- 记一次使用EasyExcel出现Convert excel format exception.You can try specifying the ‘excelType‘ yourself
- MATLAB 脚本 编写 泰勒展开
- Pr 入门教程:如何使用项目面板?
- 2022年春招美团二面总结 凉经
- (PTA)数据结构(作业)2、顺序表
- SpringCloud 2021.0.1 SpringCloudGateway 3.1.1新版中GlobalFilter使用OpenFeign失败(503)的问题
- 培训学校管理系统之家校管理
- 强烈推荐 :最用心的运营数据指标解读
- 几个常用的免费高清无版权图片网站
- 围棋学习18k到7k