[实验室环境配置] kaldi安装

  • 下载kaldi 包
git clone https://github.com/kaldi-asr/kaldi.git
  • 检查并自动安装依赖库
cd tools
./extras/check_dependencies.sh # all OK 说明成功
make # 这个过程需要消耗一点时间,会下载openfst等工具
# 之所以要在tools文件夹下make的原因:https://github.com/claritylab/lucida/issues/25  https://github.com/vimalmanohar/old-kaldi-git/issues/1
  • 编译kaldi
cd src
./configure --shared
make depend
make -j 8 # 多进程处理更快,最后看到Done表示成功
  • 开机启动kaldi
[sxc19@mjrc-server12 ~]$ cd ~
[sxc19@mjrc-server12 ~]$ vim .bashrc


#将下述内容添加到.bashrc中
export KALDI_ROOT=/home/sxc19/tools/kaldi/
# BEGIN from kaldi path.sh
[ -f $KALDI_ROOT/tools/env.sh ] && . $KALDI_ROOT/tools/env.sh
export PATH=$KALDI_ROOT/tools/openfst/bin:$KALDI_ROOT/tools/sctk/bin:$PATH
[ ! -f $KALDI_ROOT/tools/config/common_path.sh ] && echo >&2 "The standard file $KALDI_ROOT/tools/config/common_path.sh is not present -> Exit!" && exit 1
. $KALDI_ROOT/tools/config/common_path.sh
export LC_ALL=C
# END
export PATH="/home/sxc19/tools/anaconda3/bin:$PATH"
  • 测试
[sxc19@mjrc-server12 ~]$ copy-feats

# 如果cmd输出该函数的用法表示安装成功,如下所示

copy-feats 

Copy features [and possibly change format]
Usage: copy-feats [options] <feature-rspecifier> <feature-wspecifier>
or:   copy-feats [options] <feats-rxfilename> <feats-wxfilename>
e.g.: copy-feats ark:- ark,scp:foo.ark,foo.scp
 or: copy-feats ark:foo.ark ark,t:txt.ark
See also: copy-matrix, copy-feats-to-htk, copy-feats-to-sphinx, select-feats,
extract-feature-segments, subset-feats, subsample-feats, splice-feats, paste-feats,
concat-feats

Options:
  --binary                    : Binary-mode output (not relevant if writing to archive) (bool, default = true)
  --compress                  : If true, write output in compressed form(only currently supported for wxfilename, i.e. archive/script,output) (bool, default = false)
  --compression-method        : Only relevant if --compress=true; the method (1 through 7) to compress the matrix.  Search for CompressionMethod in src/matrix/compressed-matrix.h. (int, default = 1)
  --htk-in                    : Read input as HTK features (bool, default = false)
  --sphinx-in                 : Read input as Sphinx features (bool, default = false)
  --write-num-frames          : Wspecifier to write length in frames of each utterance. e.g. 'ark,t:utt2num_frames'.  Only applicable if writing tables, not when this program is writing individual files.  See also feat-to-len. (string, default = "")

Standard options:
  --config                    : Configuration file to read (this option may be repeated) (string, default = "")
  --help                      : Print out usage message (bool, default = false)
  --print-args                : Print the command line arguments (to stderr) (bool, default = true)
  --verbose                   : Verbose level (higher->more logging) (int, default = 0)

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值