From: Kirill K. <kir...@sm...> - 2015-05-02 00:33:07
|
Here's a small patch to make_denlats.sh. My awk does not have a function gensub() (Ubuntu 14.04 packages gawk separately from awk!), and because of that the generated lat.scp was empty. Compounding the problem, mpe training happily proceeded, even though missing lattices for every utterance. Took me a while to track back. I have changed the code to use sed and to fail if the generated scp has a zero length. -kkm Index: egs/wsj/s5/steps/nnet/make_denlats.sh =================================================================== --- egs/wsj/s5/steps/nnet/make_denlats.sh (revision 5032) +++ egs/wsj/s5/steps/nnet/make_denlats.sh (working copy) @@ -181,7 +181,8 @@ #2) Generate 'scp' for reading the lattices for n in `seq $nj`; do - find $dir/lat${n} -name "*.gz" | awk -v FS="/" '{ print gensub(".gz","","",$NF)" gunzip -c "$0" |"; }' -done >$dir/lat.scp + find $dir/lat${n} -name "*.gz" | sed -e 's%.*/\(.*\)\.gz%\1 gunzip -c \0 |%' +done | sort >$dir/lat.scp +[ -s $dir/lat.scp ] || exit 1 echo "$0: done generating denominator lattices." |