Skip to content

Commit

Permalink
Nnet3 segmentation: fix default params
Browse files Browse the repository at this point in the history
  • Loading branch information
rezame authored Apr 14, 2019
1 parent ebfa3cb commit 58e91fb
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions egs/wsj/s5/steps/cleanup/clean_and_segment_data_nnet3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ beam=15.0
lattice_beam=1.0

acwt=0.1 # Just a default value, used for adaptation and beam-pruning..
post_decode_acwt=1.0 # can be used in 'chain' systems to scale acoustics by 10 so the
# regular scoring script works.


# Contexts must ideally match training
extra_left_context=0 # Set to some large value, typically 40 for LSTM (must match training)
Expand Down Expand Up @@ -109,6 +108,22 @@ cp $srcdir/cmvn_opts $dir
cp $srcdir/{splice_opts,delta_opts,final.mat,final.alimdl} $dir 2>/dev/null || true
cp $srcdir/frame_subsampling_factor $dir 2>/dev/null || true

if [ -f $srcdir/frame_subsampling_factor ]; then
echo "$0: guessing that this is a chain system, checking parameters."
if [ -z $scale_opts ]; then
echo "$0: setting scale_opts"
scale_opts="--self-loop-scale=1.0 --transition-scale=1.0"
fi
if [ $acwt == 0.1 ]; then
echo "$0: setting acwt=1.0"
acwt=1.0
fi
if [ $lmwt == 10 ]; then
echo "$0: setting lmwt=1.0"
lmwt=1
fi
fi

utils/lang/check_phones_compatible.sh $lang/phones.txt $srcdir/phones.txt
cp $lang/phones.txt $dir

Expand Down Expand Up @@ -142,7 +157,7 @@ if [ $stage -le 3 ]; then
echo "$0: Decoding with biased language models..."

steps/cleanup/decode_segmentation_nnet3.sh \
--acwt $acwt --post-decode-acwt $post_decode_acwt \
--acwt $acwt \
--beam $beam --lattice-beam $lattice_beam --nj $nj --cmd "$cmd --mem 4G" \
--skip-scoring true --allow-partial false \
--extra-left-context $extra_left_context \
Expand Down

0 comments on commit 58e91fb

Please sign in to comment.