在理解lattice之后,发现lattice也是可以做音频上的预测对齐的,这个比强制对齐工具好用多了,有时候的确需要用。因为不需要提供y,这里做一个笔记,其实很早之前就开始用了。要感谢各位语音好友的理解上的帮助
1 lattice-align-words-lexicon结合nbest-to-ctm
其实就是lattice-align-words-lexicon和lattice-align-words的用法,到词(word)上的对齐
和ali.gz一样,lattice其实也是可以对齐的,对齐到lexicon,由于在prepare_lang.sh时将position-dependent-phones设置为了false,因此,不能使用lattice-align-words命令,可用lattice-align-words-lexicon来代替
:
utils/prepare_lang.sh --position-dependent-phones false \
data/local/dict "<UNK>" data/local/lang data/lang
若使用nbest-co-ctm会没有置信度
lattice-1best --lm-scale=10 --word-ins-penalty=0.0 \
"ark:gunzip -c 20200921.lat.bin.prune.gz|" ark,t:- |