online2-wav-nnet3-latgen-faster 在线解码,文件输入输出
decode.sh运行程序
./online2-wav-nnet3-latgen-faster
--do-endpointing=false
--frames-per-chunk=20
--extra-left-context-initial=0
--online=true
--config=exp/chain/tdnn7q_sp_online/conf/online.conf
--min-active=200
--max-active=7000
--beam=15.0
--lattice-beam=6.0
--acoustic-scale=1.0
--word-symbol-table=exp/chain/tdnn7q_sp/graph/words.txt
exp/chain/tdnn7q_sp_online/final.mdl
exp/chain/tdnn7q_sp/graph/HCLG.fst
ark:data/call_center_26s_hires/split1/1/spk2utt
'ark,s,cs:wav-copy scp,p:data/call_center_26s_hires/split1/1/wav.scp ark:- |'
'ark:|lattice-scale --acoustic-scale=10.0 ark:- ark:- | gzip -c >exp/chain/tdnn7q_sp_online/decode_call_center_26s/lat.1.gz'
.ark是数据(二进制文件),.scp是记录对应ark的路径;.ark文件一般都是很大的(因为他们里面是真正的数据),可以通过下面的命令查看:copy-feats ark:mfcc/raw_mfcc_train.1.ark ark,t:- | head
kaldi不会自己判断这到底是个script还是archive形式,这需要我们加前缀告诉kaldi这是什么格式的文件。对于code而言,这两种格式对它来说都是一样的。
Table 有两种形式: “ archive”和“ script”文件。 它们之间的差别在于:archive包含实际的数据, 而 script 文件则指出数据的具体位置
从 Tabla中读数据的程序需要一个“ rspecifier” 输入, 该字符串指明了如何读取索引数据
写数据到Table 中的程序需要一个“ wspecifier” 输入, 该字符串指示如何写数据
常用的“rspecifiers” 有“ ark:-” , 表示从标准的输入中读取archive数据
“scp:foo.scp” 表示 script 文件“ foo.scp” 会告诉我们从哪里去读取数据
rspecifiers文件参数:
s:keys是有序的
cs:按顺序访问数据 (程序不满足会崩溃)
p :忽略错误
所以上述decode.sh运行程序可重新写为:
./online2-wav-nnet3-latgen-faster
--do-endpointing=false
--frames-per-chunk=20
--extra-left-context-initial=0
--online=true
--config=exp/chain/tdnn7q_sp_online/conf/online.conf
--min-active=200
--max-active=7000
--beam=15.0
--lattice-beam=6.0
--acoustic-scale=1.0
--word-symbol-table=exp/chain/tdnn7q_sp/graph/words.txt
exp/chain/tdnn7q_sp_online/final.mdl
exp/chain/tdnn7q_sp/graph/HCLG.fst
ark:data/call_center_26s_hires/split1/1/spk2utt
scp,p:data/call_center_26s_hires/split1/1/wav.scp
ark:exp/chain/tdnn7q_sp_online/decode_call_center_26s/lat.1
来源:CSDN
作者:翁卓
链接:https://blog.csdn.net/libeicuo8108/article/details/90214697