Skip to content

Commit

Permalink
Merge pull request #3 from pegahgh/chain-online-nnet3
Browse files Browse the repository at this point in the history
changed beam to 11, commented online decoding block and added online decoding results to 6v_sp script.
  • Loading branch information
realill committed Apr 14, 2016
2 parents 84a853c + b4cc829 commit 97e675f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 49 deletions.
2 changes: 1 addition & 1 deletion egs/swbd/s5c/conf/decode_online.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
beam=15.0 # beam for decoding. Was 13.0 in the scripts.
beam=11.0 # beam for decoding.
first_beam=8.0 # beam for 1st-pass decoding in SAT.
103 changes: 55 additions & 48 deletions egs/swbd/s5c/local/chain/run_tdnn_6v.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

# This script contains online decoding using chain + nnet3 setup.
# _6v is as _6h, but moving to a TDNN+ReLU recipe instead of using jesus-layer.
# Otherwise we make everything as similar as possible to 6h.
# The ReLU dimension, at 576, is chosen to make the number of parameters about
Expand Down Expand Up @@ -224,53 +224,60 @@ if [ $stage -le 14 ]; then
done
fi

if [ $stage -le 15 ]; then
# If this setup used PLP features, we'd have to give the option --feature-type plp
# to the script below.
steps/online/nnet3/prepare_online_decoding.sh --mfcc-config conf/mfcc_hires.conf \
data/lang exp/nnet3/extractor "$dir" ${dir}_online || exit 1;
fi



if [ $stage -le 16 ]; then
iter_opts=
if [ ! -z $decode_iter ]; then
iter_opts=" --iter $decode_iter "
fi
for decode_set in train_dev eval2000; do
(
steps/online/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 \
--nj 50 --cmd "$decode_cmd" $iter_opts --config conf/decode_online.config \
$graph_dir data/${decode_set}_hires ${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_${decode_suff} || exit 1;
if $has_fisher; then
steps/lmrescore_const_arpa.sh --cmd "$decode_cmd" \
data/lang_sw1_{tg,fsh_fg} data/${decode_set}_hires \
${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_sw1_{tg,fsh_fg} || exit 1;
fi
) &
done
fi

if [ $stage -le 17 ]; then
iter_opts=
if [ ! -z $decode_iter ]; then
iter_opts=" --iter $decode_iter "
fi
for decode_set in train_dev eval2000; do
(
steps/online/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 --config conf/decode_online.config \
--nj 50 --cmd "$decode_cmd" $iter_opts --per-utt true \
$graph_dir data/${decode_set}_hires ${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_${decode_suff}_per_utt || exit 1;
if $has_fisher; then
steps/lmrescore_const_arpa.sh --cmd "$decode_cmd" \
data/lang_sw1_{tg,fsh_fg} data/${decode_set}_hires \
${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_sw1_{tg,fsh_fg}_per_utt || exit 1;
fi
) &
done
fi

# Results using offline and online decoding
# System 6v_sp 6v_sp_online 6v_sp_online{per_utt}
# WER on train_dev(tg) 14.68 14.72 15.43
# WER on train_dev(fg) 13.49 13.58 14.18
# WER on eval2000(tg) 17.2 17.3 18.2
# WER on eval2000(fg) 15.7 15.9 16.7

#if [ $stage -le 15 ]; then
# # If this setup used PLP features, we'd have to give the option --feature-type plp
# # to the script below.
# steps/online/nnet3/prepare_online_decoding.sh --mfcc-config conf/mfcc_hires.conf \
# data/lang exp/nnet3/extractor "$dir" ${dir}_online || exit 1;
#fi



#if [ $stage -le 16 ]; then
# iter_opts=
# if [ ! -z $decode_iter ]; then
# iter_opts=" --iter $decode_iter "
# fi
# for decode_set in train_dev eval2000; do
# (
# steps/online/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 \
# --nj 50 --cmd "$decode_cmd" $iter_opts --config conf/decode_online.config \
# $graph_dir data/${decode_set}_hires ${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_${decode_suff} || exit 1;
# if $has_fisher; then
# steps/lmrescore_const_arpa.sh --cmd "$decode_cmd" \
# data/lang_sw1_{tg,fsh_fg} data/${decode_set}_hires \
# ${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_sw1_{tg,fsh_fg} || exit 1;
# fi
# ) &
# done
#fi
#
#if [ $stage -le 17 ]; then
# iter_opts=
# if [ ! -z $decode_iter ]; then
# iter_opts=" --iter $decode_iter "
# fi
# for decode_set in train_dev eval2000; do
# (
# steps/online/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 --config conf/decode_online.config \
# --nj 50 --cmd "$decode_cmd" $iter_opts --per-utt true \
# $graph_dir data/${decode_set}_hires ${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_${decode_suff}_per_utt || exit 1;
# if $has_fisher; then
# steps/lmrescore_const_arpa.sh --cmd "$decode_cmd" \
# data/lang_sw1_{tg,fsh_fg} data/${decode_set}_hires \
# ${dir}_online/decode_${decode_set}${decode_iter:+_$decode_iter}_sw1_{tg,fsh_fg}_per_utt || exit 1;
# fi
# ) &
# done
#fi
#
wait;

exit 0;

0 comments on commit 97e675f

Please sign in to comment.