当前位置:网站首页>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
边栏推荐
- [Recommender System]: Overview of Collaborative Filtering and Content-Based Filtering
- 详述 MIMIC护理人员信息表(十五)
- Pico neo3 Unity打包设置
- oracle数据库中列转行,列会有变化
- oracle19c不支持实时同步参数,请教一下大佬们有什么好的解决办法吗?
- 1.2-误差来源
- 零基础SQL教程: 基础查询 05
- tf中矩阵乘法
- go-grpc TSL认证 解决 transport: authentication handshake failed: x509 certificate relies on ... ...
- Keep track of your monthly income and expenses through bookkeeping
猜你喜欢
分布式锁-Redission - 缓存一致性解决
About # SQL problem: how to set the following data by commas into multiple lines, in the form of column display
易观分析联合中小银行联盟发布海南数字经济指数,敬请期待!
1081 Check Password (15 points)
1071 小赌怡情 (15 分)
少年成就黑客,需要这些技能
tf中自减操作;tf.assign_sub()
3GPP LTE/NR信道模型
Interaction of Pico neo3 in Unity
4.1-支持向量机
随机推荐
tf.reduce_mean() and tf.reduce_sum()
年薪40W测试工程师成长之路,你在哪个阶段?
leetcode: 69. Square root of x
【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
1091 N-Defensive Number (15 points)
1.1-Regression
TF通过feature与label生成(特征,标签)集合,tf.data.Dataset.from_tensor_slices
零基础SQL教程: 主键、外键和索引 04
1056 组合数的和 (15 分)
接口测试的基础流程和用例设计方法你知道吗?
【Pytorch】nn.ReLU(inplace=True)
Active users of mobile banking grew rapidly in June, hitting a half-year high
TF中的四则运算
Pytorch模型转ONNX模型
求职简历这样写,轻松搞定面试官
6月各手机银行活跃用户较快增长,创半年新高
leetcode:69. x 的平方根
2022-08-09 Group 4 Self-cultivation class study notes (every day)
【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
3.1-Classification-probabilistic generative model