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
cd src ./configure --shared make depend make -j 8 # 多进程处理更快,最后看到Done表示成功
[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)