Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
23ec7a1
[egs] several updates of the tunisian_msa recipe (#2752)
xiaohui-zhang Oct 3, 2018
9c813ca
[egs] Small fix to Tunisian MSA TDNN script (RE train_stage) (#2757)
francoishernandez Oct 3, 2018
c78875a
[src,scripts] Batched nnet3 computation (#2726)
danpovey Oct 4, 2018
8b8604c
[build] Add python3 compatibility to install scripts (#2748)
leomao Oct 4, 2018
2d163f4
[scripts] tfrnnlm: Modify TensorFlow flag format for compatibility wi…
ervaibhavkumar Oct 4, 2018
e3150a2
[egs] fix old style perl regex in egs/chime1/s5/local/chime1_prepare_…
kobayakawa-t-ko Oct 5, 2018
ad2bb82
[scripts] Fix bug in steps/cleanup/debug_lexicon.sh (#2763)
xiaohui-zhang Oct 5, 2018
c0e34f8
[egs] Add example for Yomdle Farsi OCR (#2702)
ChunChiehChang Oct 5, 2018
4c8d446
[scripts] debug_lexicon.sh: Fix bug introduced in #2763. (#2764)
danpovey Oct 6, 2018
f279dd9
[egs] add missing online cmvn config in aishell2 (#2767)
dophist Oct 7, 2018
f91dde6
[egs] Add CNN-TDNN-F script for Librispeech (#2744)
yangxueruivs Oct 7, 2018
e54462e
[src] Some minor cleanup/fixes regarding CUDA memory allocation; othe…
danpovey Oct 7, 2018
a702621
[scripts] Update reverberate_data_dir.py so that it works with python…
david-ryan-snyder Oct 8, 2018
00c7382
[egs] Chime5: fix total number of words for WER calculation (#2772)
siddalmia Oct 9, 2018
50411bd
[egs] RNNLMs on Tedlium w/ Google 1Bword: Increase epochs, update res…
keli78 Oct 9, 2018
735e2a5
[scripts,egs] Added phonetisaurus-based g2p scripts (#2730)
huangruizhe Oct 9, 2018
43ec82e
[egs] madcat arabic: clean scripts, tuning, rescoring, text localizat…
aarora8 Oct 9, 2018
535bb2c
[scripts] Enhancements & minor bugfix to segmentation postprocessing …
stanleyguan Oct 11, 2018
8d1eb93
[src] Update gmm-decode-simple to accept ConstFst (#2787)
desh2608 Oct 12, 2018
087c21f
[scripts] Update documentation of train_raw_dnn.py (#2785)
vimalmanohar Oct 13, 2018
a10e56e
[src] nnet3: extend what descriptors can be parsed. (#2780)
danpovey Oct 13, 2018
8b08e00
[src] Small fix to 'fstrand' (make sure args are parsed) (#2777)
huangruizhe Oct 13, 2018
dc6a496
[src,scripts] Minor, mostly cosmetic updates (#2788)
danpovey Oct 13, 2018
59d1544
[src,scripts] Add script to compare alignment directories. (#2765)
danpovey Oct 13, 2018
7e9d8cb
[scripts] Small fixes to script usage messages, etc. (#2789)
teinhonglo Oct 13, 2018
fcf9b97
[egs] Update ami_download.sh after changes on Edinburgh website. (#2769)
puneetbawa Oct 15, 2018
024d130
[scripts] Update compare_alignments.sh to allow different lang dirs. …
danpovey Oct 17, 2018
f5e8171
[scripts] Change make_rttm.py so output is in determinstic order (#2794)
oplatek Oct 18, 2018
2668098
[egs] Fixes to yomdle_zh RE encoding direction, etc. (#2791)
ChunChiehChang Oct 19, 2018
8e30fdd
[src] Add support for context independent phones in gmm-init-biphone …
hhadian Oct 20, 2018
d68c00a
[egs] Simplifying multi-condition version of AMI recipe (#2800)
vimalmanohar Oct 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions egs/aishell2/s5/conf/online_cmvn.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# configuration file for apply-cmvn-online
9 changes: 4 additions & 5 deletions egs/ami/s5/local/ami_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ cat local/split_train.orig local/split_eval.orig local/split_dev.orig > $wdir/am
wgetfile=$wdir/wget_$mic.sh

# TODO fix this with Pawel, files don't exist anymore,
manifest="wget --continue -O $adir/MANIFEST.TXT http://groups.inf.ed.ac.uk/ami/download/temp/amiBuild-04237-Sun-Jun-15-2014.manifest.txt"
license="wget --continue -O $adir/LICENCE.TXT http://groups.inf.ed.ac.uk/ami/download/temp/Creative-Commons-Attribution-NonCommercial-ShareAlike-2.5.txt"
manifest="wget --continue -O $adir/MANIFEST.TXT http://groups.inf.ed.ac.uk/ami/download/temp/amiBuild-0153-Tue-Oct-2-2018.manifest.txt"


echo "#!/bin/bash" > $wgetfile
echo $manifest >> $wgetfile
echo $license >> $wgetfile

while read line; do
if [ "$mic" == "ihm" ]; then
extra_headset= #some meetings have 5 sepakers (headsets)
Expand Down Expand Up @@ -100,8 +100,7 @@ else
fi
fi

echo "Downloads of AMI corpus completed succesfully. License can be found under $adir/LICENCE.TXT"
echo "Downloads of AMI corpus completed succesfully."
exit 0;



2 changes: 1 addition & 1 deletion egs/ami/s5/local/tfrnnlm/run_lstm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mkdir -p $dir
if [ $stage -le 2 ]; then
# the following script uses TensorFlow. You could use tools/extras/install_tensorflow_py.sh to install it
$cuda_cmd $dir/train_rnnlm.log utils/parallel/limit_num_gpus.sh \
python steps/tfrnnlm/lstm.py --data-path=$dir --save-path=$dir/rnnlm --vocab-path=$dir/wordlist.rnn.final
python steps/tfrnnlm/lstm.py --data_path=$dir --save_path=$dir/rnnlm --vocab_path=$dir/wordlist.rnn.final
fi

final_lm=ami_fsh.o3g.kn
Expand Down
2 changes: 1 addition & 1 deletion egs/ami/s5/local/tfrnnlm/run_lstm_fast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mkdir -p $dir
if [ $stage -le 2 ]; then
# the following script uses TensorFlow. You could use tools/extras/install_tensorflow_py.sh to install it
$cuda_cmd $dir/train_rnnlm.log utils/parallel/limit_num_gpus.sh \
python steps/tfrnnlm/lstm_fast.py --data-path=$dir --save-path=$dir/rnnlm --vocab-path=$dir/wordlist.rnn.final
python steps/tfrnnlm/lstm_fast.py --data_path=$dir --save_path=$dir/rnnlm --vocab_path=$dir/wordlist.rnn.final
fi

final_lm=ami_fsh.o3g.kn
Expand Down
2 changes: 1 addition & 1 deletion egs/ami/s5/local/tfrnnlm/run_vanilla_rnnlm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mkdir -p $dir
if [ $stage -le 2 ]; then
# the following script uses TensorFlow. You could use tools/extras/install_tensorflow_py.sh to install it
$cuda_cmd $dir/train_rnnlm.log utils/parallel/limit_num_gpus.sh \
python steps/tfrnnlm/vanilla_rnnlm.py --data-path=$dir --save-path=$dir/rnnlm --vocab-path=$dir/wordlist.rnn.final
python steps/tfrnnlm/vanilla_rnnlm.py --data_path=$dir --save_path=$dir/rnnlm --vocab_path=$dir/wordlist.rnn.final
fi

final_lm=ami_fsh.o3g.kn
Expand Down
4 changes: 4 additions & 0 deletions egs/ami/s5b/RESULTS_ihm
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@

# local/chain/multi_condition/tuning/run_tdnn_lstm_1a.sh --mic ihm
# cleanup + chain TDNN+LSTM model + IHM reverberated data
# Old results:
%WER 19.4 | 13098 94479 | 83.8 10.0 6.1 3.2 19.4 51.8 | -0.168 | exp/ihm/chain_cleaned_rvb/tdnn_lstm1i_sp_rvb_bi/decode_dev/ascore_10/dev_hires.ctm.filt.sys
%WER 19.3 | 12643 89977 | 83.3 11.0 5.7 2.6 19.3 49.6 | -0.046 | exp/ihm/chain_cleaned_rvb/tdnn_lstm1i_sp_rvb_bi/decode_eval/ascore_10/eval_hires.ctm.filt.sys

# New results after simplifying scripts to remove combining short segments etc.:
%WER 19.4 | 12643 89979 | 83.1 10.9 6.0 2.5 19.4 50.7 | 0.010 | exp/ihm/chain_cleaned_rvb/tdnn_lstm1a_sp_rvb_bi/decode_eval/ascore_11/eval_hires.ctm.filt.sys
%WER 19.4 | 13098 94484 | 83.7 10.2 6.1 3.1 19.4 52.0 | -0.119 | exp/ihm/chain_cleaned_rvb/tdnn_lstm1a_sp_rvb_bi/decode_dev/ascore_11/dev_hires.ctm.filt.sys
4 changes: 4 additions & 0 deletions egs/ami/s5b/RESULTS_sdm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
# local/chain/multi_condition/tuning/run_tdnn_lstm_1a.sh --mic sdm1 --use-ihm-ali true --train-set train_cleaned --gmm tri3_cleaned
# cleanup + chain TDNN+LSTM model, SDM original + IHM reverberated data, alignments from ihm data.
# *** best system ***
# Old results:
%WER 34.0 | 14455 94497 | 69.8 17.7 12.5 3.8 34.0 63.9 | 0.675 | exp/sdm1/chain_cleaned_rvb/tdnn_lstm1i_sp_rvb_bi_ihmali/decode_dev/ascore_10/dev_hires_o4.ctm.filt.sys
%WER 37.5 | 13261 89982 | 65.9 19.3 14.7 3.5 37.5 66.2 | 0.642 | exp/sdm1/chain_cleaned_rvb/tdnn_lstm1i_sp_rvb_bi_ihmali/decode_eval/ascore_10/eval_hires_o4.ctm.filt.sys

# New results after simplifying scripts to remove combining short segments etc.:
%WER 34.6 | 14604 94498 | 69.6 18.8 11.6 4.2 34.6 64.4 | 0.652 | exp/sdm1/chain_cleaned_rvb/tdnn_lstm1a_sp_rvb_bi_ihmali/decode_dev/ascore_11/dev_hires_o4.ctm.filt.sys
%WER 37.6 | 13606 89636 | 66.1 21.0 12.9 3.7 37.6 65.1 | 0.613 | exp/sdm1/chain_cleaned_rvb/tdnn_lstm1a_sp_rvb_bi_ihmali/decode_eval/ascore_11/eval_hires_o4.ctm.filt.sys
87 changes: 41 additions & 46 deletions egs/ami/s5b/local/chain/multi_condition/tuning/run_tdnn_lstm_1a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,28 @@ set -e -o pipefail
stage=0
mic=ihm
nj=30
min_seg_len=1.55
use_ihm_ali=false
train_set=train_cleaned
gmm=tri3_cleaned # the gmm for the target data
ihm_gmm=tri3_cleaned # the gmm for the IHM system (if --use-ihm-ali true).
num_threads_ubm=32
num_data_reps=1

chunk_width=150
chunk_width=160,140,110,80
chunk_left_context=40
chunk_right_context=0
label_delay=5
# The rest are configs specific to this script. Most of the parameters
# are just hardcoded at this level, in the commands below.
train_stage=-10
tree_affix= # affix for tree directory, e.g. "a" or "b", in case we change the configuration.
tlstm_affix=1i #affix for TDNN-LSTM directory, e.g. "a" or "b", in case we change the configuration.
tlstm_affix=1a #affix for TDNN-LSTM directory, e.g. "a" or "b", in case we change the configuration.
common_egs_dir= # you can set this to use previously dumped egs.


# decode options
extra_left_context=50
frames_per_chunk=
frames_per_chunk=160


# End configuration section.
Expand Down Expand Up @@ -75,31 +74,27 @@ rvb_affix=_rvb

if $use_ihm_ali; then
gmm_dir=exp/ihm/${ihm_gmm}
ali_dir=exp/${mic}/${ihm_gmm}_ali_${train_set}_sp_comb_ihmdata
lores_train_data_dir=data/$mic/${train_set}_ihmdata_sp_comb
lores_train_data_dir=data/$mic/${train_set}_ihmdata_sp
tree_dir=exp/$mic/chain${nnet3_affix}/tree_bi${tree_affix}_ihmdata
original_lat_dir=exp/$mic/chain${nnet3_affix}/${ihm_gmm}_${train_set}_sp_comb_lats_ihmdata
lat_dir=exp/$mic/chain${nnet3_affix}${rvb_affix}/${ihm_gmm}_${train_set}_sp${rvb_affix}_comb_lats_ihmdata
original_lat_dir=exp/$mic/chain${nnet3_affix}/${ihm_gmm}_${train_set}_sp_lats_ihmdata
lat_dir=exp/$mic/chain${nnet3_affix}${rvb_affix}/${ihm_gmm}_${train_set}_sp${rvb_affix}_lats_ihmdata
dir=exp/$mic/chain${nnet3_affix}${rvb_affix}/tdnn_lstm${tlstm_affix}_sp${rvb_affix}_bi_ihmali
# note: the distinction between when we use the 'ihmdata' suffix versus
# 'ihmali' is pretty arbitrary.
else
gmm_dir=exp/${mic}/$gmm
ali_dir=exp/${mic}/${gmm}_ali_${train_set}_sp_comb
lores_train_data_dir=data/$mic/${train_set}_sp_comb
lores_train_data_dir=data/$mic/${train_set}_sp
tree_dir=exp/$mic/chain${nnet3_affix}/tree_bi${tree_affix}
original_lat_dir=exp/$mic/chain${nnet3_affix}/${gmm}_${train_set}_sp_comb_lats
lat_dir=exp/$mic/chain${nnet3_affix}${rvb_affix}/${gmm}_${train_set}_sp${rvb_affix}_comb_lats
original_lat_dir=exp/$mic/chain${nnet3_affix}/${gmm}_${train_set}_sp_lats
lat_dir=exp/$mic/chain${nnet3_affix}${rvb_affix}/${gmm}_${train_set}_sp${rvb_affix}_lats
dir=exp/$mic/chain${nnet3_affix}${rvb_affix}/tdnn_lstm${tlstm_affix}_sp${rvb_affix}_bi
fi


local/nnet3/multi_condition/run_ivector_common.sh --stage $stage \
--mic $mic \
--nj $nj \
--min-seg-len $min_seg_len \
--train-set $train_set \
--gmm $gmm \
--num-threads-ubm $num_threads_ubm \
--num-data-reps $num_data_reps \
--nnet3-affix "$nnet3_affix"
Expand All @@ -109,13 +104,13 @@ local/nnet3/multi_condition/run_ivector_common.sh --stage $stage \
local/nnet3/prepare_lores_feats.sh --stage $stage \
--mic $mic \
--nj $nj \
--min-seg-len $min_seg_len \
--min-seg-len "" \
--use-ihm-ali $use_ihm_ali \
--train-set $train_set


train_data_dir=data/$mic/${train_set}_sp${rvb_affix}_hires_comb
train_ivector_dir=exp/$mic/nnet3${nnet3_affix}${rvb_affix}/ivectors_${train_set}_sp${rvb_affix}_hires_comb
train_data_dir=data/$mic/${train_set}_sp${rvb_affix}_hires
train_ivector_dir=exp/$mic/nnet3${nnet3_affix}${rvb_affix}/ivectors_${train_set}_sp${rvb_affix}_hires
final_lm=`cat data/local/lm/final_lm`
LM=$final_lm.pr1-7

Expand All @@ -126,19 +121,6 @@ for f in $gmm_dir/final.mdl $lores_train_data_dir/feats.scp \
done


if [ $stage -le 11 ]; then
if [ -f $ali_dir/ali.1.gz ]; then
echo "$0: alignments in $ali_dir appear to already exist. Please either remove them "
echo " ... or use a later --stage option."
exit 1
fi
echo "$0: aligning perturbed, short-segment-combined ${maybe_ihm}data"
steps/align_fmllr.sh --nj $nj --cmd "$train_cmd" \
${lores_train_data_dir} data/lang $gmm_dir $ali_dir
fi

[ ! -f $ali_dir/ali.1.gz ] && echo "$0: expected $ali_dir/ali.1.gz to exist" && exit 1

if [ $stage -le 12 ]; then
echo "$0: creating lang directory with one state per phone."
# Create a version of the lang/ directory that has one state per phone in the
Expand All @@ -165,28 +147,42 @@ fi
if [ $stage -le 13 ]; then
# Get the alignments as lattices (gives the chain training more freedom).
# use the same num-jobs as the alignments
steps/align_fmllr_lats.sh --nj 100 --cmd "$train_cmd" ${lores_train_data_dir} \
steps/align_fmllr_lats.sh --nj 100 --cmd "$train_cmd" \
--generate-ali-from-lats true ${lores_train_data_dir} \
data/lang $gmm_dir $original_lat_dir
rm $original_lat_dir/fsts.*.gz # save space

lat_dir_ihmdata=exp/ihm/chain${nnet3_affix}/${gmm}_${train_set}_sp_comb_lats
lat_dir_ihmdata=exp/ihm/chain${nnet3_affix}/${gmm}_${train_set}_sp_lats

original_lat_nj=$(cat $original_lat_dir/num_jobs)
ihm_lat_nj=$(cat $lat_dir_ihmdata/num_jobs)

mkdir -p $lat_dir/temp/
mkdir -p $lat_dir/temp2/
lattice-copy "ark:gunzip -c $original_lat_dir/lat.*.gz |" ark,scp:$lat_dir/temp/lats.ark,$lat_dir/temp/lats.scp
lattice-copy "ark:gunzip -c $lat_dir_ihmdata/lat.*.gz |" ark,scp:$lat_dir/temp2/lats.ark,$lat_dir/temp2/lats.scp
$train_cmd --max-jobs-run 10 JOB=1:$original_lat_nj $lat_dir/temp/log/copy_original_lats.JOB.log \
lattice-copy "ark:gunzip -c $original_lat_dir/lat.JOB.gz |" ark,scp:$lat_dir/temp/lats.JOB.ark,$lat_dir/temp/lats.JOB.scp

$train_cmd --max-jobs-run 10 JOB=1:$ihm_lat_nj $lat_dir/temp2/log/copy_ihm_lats.JOB.log \
lattice-copy "ark:gunzip -c $lat_dir_ihmdata/lat.JOB.gz |" ark,scp:$lat_dir/temp2/lats.JOB.ark,$lat_dir/temp2/lats.JOB.scp

for n in $(seq $original_lat_nj); do
cat $lat_dir/temp/lats.$n.scp
done > $lat_dir/temp/combined_lats.scp

# copy the lattices for the reverberated data
rm -f $lat_dir/temp/combined_lats.scp
touch $lat_dir/temp/combined_lats.scp
cat $lat_dir/temp/lats.scp >> $lat_dir/temp/combined_lats.scp
for i in `seq 1 $num_data_reps`; do
cat $lat_dir/temp2/lats.scp | sed -e "s/^/rev${i}_/" >> $lat_dir/temp/combined_lats.scp
done
for n in $(seq $ihm_lat_nj); do
cat $lat_dir/temp2/lats.$n.scp
done | sed -e "s/^/rev${i}_/"
done >> $lat_dir/temp/combined_lats.scp

sort -u $lat_dir/temp/combined_lats.scp > $lat_dir/temp/combined_lats_sorted.scp

lattice-copy scp:$lat_dir/temp/combined_lats_sorted.scp "ark:|gzip -c >$lat_dir/lat.1.gz" || exit 1;
echo "1" > $lat_dir/num_jobs
utils/split_data.sh $train_data_dir $nj

$train_cmd --max-jobs-run 10 JOB=1:$nj $lat_dir/copy_combined_lats.JOB.log \
lattice-copy --include=$train_data_dir/split$nj/JOB/utt2spk \
scp:$lat_dir/temp/combined_lats_sorted.scp \
"ark:|gzip -c >$lat_dir/lat.JOB.gz" || exit 1;

echo $nj > $lat_dir/num_jobs

# copy other files from original lattice dir
for f in cmvn_opts final.mdl splice_opts tree; do
Expand All @@ -206,7 +202,7 @@ if [ $stage -le 14 ]; then
steps/nnet3/chain/build_tree.sh --frame-subsampling-factor 3 \
--context-opts "--context-width=2 --central-position=1" \
--leftmost-questions-truncate -1 \
--cmd "$train_cmd" 4200 ${lores_train_data_dir} data/lang_chain $ali_dir $tree_dir
--cmd "$train_cmd" 4200 ${lores_train_data_dir} data/lang_chain $original_lat_dir $tree_dir
fi

xent_regularize=0.1
Expand Down Expand Up @@ -312,7 +308,6 @@ if [ $stage -le 18 ]; then
rm $dir/.error 2>/dev/null || true

[ -z $extra_left_context ] && extra_left_context=$chunk_left_context;
[ -z $frames_per_chunk ] && frames_per_chunk=$chunk_width;

for decode_set in dev eval; do
(
Expand Down
Loading