当前位置:网站首页>Kaldi语音识别工具编译问题记录(踩坑记录)
Kaldi语音识别工具编译问题记录(踩坑记录)
2022-08-11 07:15:00 【小小马车夫】

博客主页:小小马车夫的主页
文章目录
前言
最近由于项目需要要研究下ASR语言识别,用到了Kaldi语音识别工具,Kaldi是一个语音识别的工具箱,由C++语言开发,外围用shell脚本或其他脚本调用。这里主要记录下一在编译Kaldi时遇到各种问题(坑)。
1、cuda
首先是又官网下载cuda:
https://developer.nvidia.com/cuda-downloads
安装cuda遇到了依赖的问题(说来也奇怪同事安装的时候什么错也没遇到,吐嘈):
*** Requires: libwayland-client.so.0()(64bit) ***
*** Requires: libnvidia-egl-wayland.so.1()(64bit) ***
说明是缺库
libwayland-client.so和libnvidia-egl-wayland.so,那就下载对应的库,安装之后又报错:

没办法,继续下载吧,最后依赖库下载地址如下:
ibwayland-client-1.15.0-1.el7.x86_64.rpm
egl-wayland-1.1.6-1.el7.x86_64.rpm
libglvnd-1.0.1-0.6.git5baa1e5.el7.x86_64.rpm
libwayland-server-1.15.0-1.el7.x86_64.rpm
libglvnd-egl-1.0.1-0.6.git5baa1e5.el7.x86_64.rpm
https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/egl-wayland-1.1.6-1.el7.x86_64.rpm
http://mirror.centos.org/centos/7/os/x86_64/Packages/libwayland-client-1.15.0-1.el7.x86_64.rpm
https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/libglvnd-1.0.1-0.6.git5baa1e5.el7.x86_64.rpm
http://mirror.centos.org/centos/7/os/x86_64/Packages/libwayland-server-1.15.0-1.el7.x86_64.rpm
https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/libglvnd-egl-1.0.1-0.6.git5baa1e5.el7.x86_64.rpm
挨个下载下来安装吧:
rpm -ivh bwayland-client-1.15.0-1.el7.x86_64.rpm
rpm -ivh libglvnd-1.0.1-0.6.git5baa1e5.el7.x86_64.rpm
lrpm -ivh libwayland-server-1.15.0-1.el7.x86_64.rpm
rpm -ivh libglvnd-egl-1.0.1-0.6.git5baa1e5.el7.x86_64.rpm
rpm -ivh egl-wayland-1.1.6-1.el7.x86_64.rpm
2、openfst
openfst编译首先会遇到下面的错误:
1) ERROR: cannot verify www.openfst.org’s certificate, issued by ‘/C=US/O=Let’s Encrypt/CN=R3’: Issued certificate has expired.To connect to www.openfst.org insecurely, use `–no-check-certificate’
ERROR: cannot verify www.openfst.org's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
Issued certificate has expired.
To connect to www.openfst.org insecurely, use `--no-check-certificate'. ERROR: cannot verify www.openslr.org's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’: Issued certificate has expired. To connect to www.openslr.org insecurely, use `--no-check-certificate'.
make: *** [openfst-1.7.2.tar.gz] Error 5
按错误提示添加--no-check-certificate, 修改tools/Makefile
2) error: redeclaration ‘Weight fst::Power(const Weight& size_t)’…
然后编译时遇到下面错误:
通过错误信息看是, 有函数重复定义了,不可思议,也只能接受。最后还是找到解决办法:
https://www.openfst.org/twiki/bin/view/Forum/FstForum
很明显了,修改tools/openfst-1.7.2/src/include/fst/weight.h如下:
重新编译: make openfst 一切正常了。
3、SIRLM
1) Usage: extras/install_srilm.sh < name > < organization > < email >
编译SIRLM首先会遇到下述错误:
看错误提示,是需要参数,先自己造一下:
extras/install_srilm.sh zhangsan china.com [email protected]
2) srilm.tgz下载不下来
srilm.tgz这个原因主要是连接根本打不开,没办法,自己另找其办法下载吧:
https://github.com/gsayer/SRILM
下载下来后解压,得到srilm-1.7.3.tar.gz, 把它改名为srilm.tgz, 放到tools下面,继续编译:
cd tools
extras/install_srilm.sh
一切安好~
4、Kaldi需要升级gcc(configure failed: c++ (g++ 4.8.5) is not supported You need GNU g++ >= 5.0, Apple clang >= 6.0 or LLVM clang >= 3.5. ***)
上面所有的依赖安装完了,并把错误都解决了,就可以编译Kaldi了。
然而,你可能会遇到又一个错误:
完犊子,gcc需要升级,在此说明一下,博主刚开始是下载gcc的tar包安装的,为此还升级了make和glibc,最后glibc升级还有问题,导致所有的命令都不能用了,最后还重装了系统,因此,强烈不建议对手动升级gcc不熟悉的朋友这么做!!
好在,最后还是找了解决办法:
yum install -y centos-release-scl
yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++
scl enable devtoolset-7 bash
感谢这篇博客的博主:https://blog.csdn.net/qq_50607888/article/details/123908033
总结
以上就是博主在编译Kaldi时踩的坑,记录下来,如果你也遇到同样的错误,希望对你有帮助~
如果觉得有些帮助或觉得文章还不错,请关注一下博主,你的关注是我持续写作的动力。另外,如果有什么问题,可以在评论区留言,或者私信博主,博主看到后会第一时间回复。
【间歇性的努力和蒙混过日子,都是对之前努力的清零】
欢迎转载,转载请注明出处:https://blog.csdn.net/xxm524/article/details/126239910
边栏推荐
- 4.1-支持向量机
- Pytorch模型转ONNX模型
- 1036 Programming with Obama (15 points)
- 1056 Sum of Combinations (15 points)
- break pad源码编译--参考大佬博客的总结
- 1106 2019 Sequence (15 points)
- 基于微信小程序的租房小程序
- 1101 B是A的多少倍 (15 分)
- cdc连sqlserver异常对象可能有无法序列化的字段 有没有大佬看得懂的 帮忙解答一下
- 【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
猜你喜欢

Do you know the basic process and use case design method of interface testing?

1056 Sum of Combinations (15 points)

JUC并发编程

Keep track of your monthly income and expenses through bookkeeping

About # SQL problem: how to set the following data by commas into multiple lines, in the form of column display

Active users of mobile banking grew rapidly in June, hitting a half-year high

【Pytorch】nn.Linear,nn.Conv

项目2-年收入判断

tf.cast(),reduce_min(),reduce_max()

1071 小赌怡情 (15 分)
随机推荐
TF中使用softmax函数;
测试用例很难?有手就行
1076 Wifi Password (15 points)
Activity的四种状态
Evolution and New Choice of Streaming Structured Data Computing Language
The growth path of a 40W test engineer with an annual salary, which stage are you in?
matrix multiplication in tf
【LeetCode】链表题解汇总
cdc连sqlserver异常对象可能有无法序列化的字段 有没有大佬看得懂的 帮忙解答一下
Analysys and the Alliance of Small and Medium Banks jointly released the Hainan Digital Economy Index, so stay tuned!
1.1-回归
JRS303-Data Verification
2022-08-10 Group 4 Self-cultivation class study notes (every day)
伦敦银规则有哪些?
欢迎加入sumarua网络安全交流社区
Tensorflow中使用tf.argmax返回张量沿指定维度最大值的索引
为什么我使用C#操作MySQL进行中文查询失败
查找最新人员工资和上上次人员工资的变动情况
JUC并发编程
Four startup modes of Activity