kaldi从下载到配置环境再到编译记录

下载文件

1.升级下载源 sudo apt-get update
2. 安装Git sudo apt-get install git
3. 下载安装包 git clone https://github.com/kaldi-asr/kaldi.git 4. 检查依赖库cd kaldi/toolsextras/check_dependencies.sh`

root@debian10:/home/ZQ_projects/kaldi/tools#
extras/check_dependencies.sh extras/check_dependencies.sh: wget is not
installed. extras/check_dependencies.sh: sox is not installed.
extras/check_dependencies.sh: subversion is not installed
extras/check_dependencies.sh: OpenBLAS not detected. Run
extras/install_openblas.sh … to compile it for your platform, or
configure with --openblas-root= if you … have it installed in a
location we could not guess. Note that packaged … library may be
significantly slower and/or older than the one the above … would
build. … You can also use other matrix algebra libraries. For
information, see: … http://kaldi-asr.org/doc/matrixwrap.html
extras/check_dependencies.sh: Some prerequisites are missing; install
them using the command: sudo apt-get install wget sox subversion

  1. 安装缺少的库文件 sudo apt-get install wget sox subversion
  2. 安装OpenBLAS

sudo apt-get install libopenblas-dev
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make -j8
sudo make PREFIX=/usr/local/OpenBLAS install
添加环境变量
vim /etc/profile 末尾加上
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/OpenBLAS/lib/
然后 source /etc/profile

  1. extras/check_dependencies.sh: all OK.
  2. 然后 make -j4会报错,安装openblas
  3. extras/install_openblas.sh
  4. cd openfst-1.7.2然后在安装openfst,执行make 操作时出现 如下问题
Makefile:372: recipe for target 'aclocal.m4' failed
解决办法:在linux终端下执行 :autoreconf -vfi
  1. ./configure
  2. make
  3. sudo make install
  4. cd ..
  5. 然后 make -j4
  6. cd ..
  7. cd src/ 进入src目录依次执行如下命令
./configure
make depend
make

编译时间较长,最好指定cpu个数编译

以上安装方法不能在RK-3399开发板上编译,G++报错g++: internal compiler error: Killed (program cc1plus)
查了很多资料,最后发现主要原因是内存不足,g++编译时需要大量内存
所以在rk3399开发板上安装vosk
可以参考官网的说明资料:

https://alphacephei.com/vosk/install
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值