
# ./run_prepare_shared.sh  # if not already done.
# ./run.sh --mic mdm8
#

#  steps/info/gmm_dir_info.pl exp/mdm8/{mono,tri1,tri2,tri3,tri3_cleaned}
# exp/mdm8/mono: nj=30 align prob=-92.06 over 10.78h [retry=6.3%, fail=0.1%] states=137 gauss=980
# exp/mdm8/tri1: nj=30 align prob=-89.91 over 76.18h [retry=5.6%, fail=0.1%] states=3829 gauss=80166 tree-impr=3.17
# exp/mdm8/tri2: nj=30 align prob=-51.10 over 76.15h [retry=5.0%, fail=0.2%] states=3913 gauss=80127 tree-impr=3.37 lda-sum=11.01 mllt:impr,logdet=0.66,1.13
# exp/mdm8/tri3: nj=30 align prob=-52.15 over 76.19h [retry=3.0%, fail=0.1%] states=4011 gauss=80071 fmllr-impr=3.99 over 53.86h tree-impr=4.79
# exp/mdm8/tri3_cleaned: nj=50 align prob=-51.69 over 69.07h [retry=0.7%, fail=0.0%] states=4029 gauss=80051 fmllr-impr=0.87 over 52.85h tree-impr=5.32


# steps/info/nnet3_dir_info.pl exp/mdm8/nnet3_cleaned/tdnn_sp_ihmali exp/sdm1/nnet3_cleaned/tdnn_sp exp/sdm1/nnet3/tdnn_sp_ihmali
# exp/mdm8/nnet3_cleaned/tdnn_sp_ihmali: num-iters=82 nj=2..12 num-params=10.9M dim=40+100->3980 combine=-2.04->-1.98 loglike:train/valid[53,81,final]=(-2.20,-2.01,-2.00/-2.70,-2.71,-2.71) accuracy:train/valid[53,81,final]=(0.48,0.52,0.51/0.41,0.41,0.41)
# exp/sdm1/nnet3_cleaned/tdnn_sp: num-iters=82 nj=2..12 num-params=10.9M dim=40+100->3961 combine=-2.24->-2.19 loglike:train/valid[53,81,final]=(-2.41,-2.20,-2.19/-2.86,-2.87,-2.87) accuracy:train/valid[53,81,final]=(0.45,0.49,0.49/0.39,0.39,0.40)
# exp/sdm1/nnet3/tdnn_sp_ihmali: num-iters=92 nj=2..12 num-params=10.9M dim=40+100->3980 combine=-2.15->-2.10 loglike:train/valid[60,91,final]=(-2.33,-2.14,-2.13/-2.99,-3.02,-3.03) accuracy:train/valid[60,91,final]=(0.45,0.48,0.49/0.36,0.36,0.36)

# steps/info/chain_dir_info.pl exp/mdm8/chain_cleaned/tdnn_sp_ihmali exp/sdm1/chain_cleaned/tdnn_sp exp/sdm1/chain/tdnn_sp_ihmali
# exp/mdm8/chain_cleaned/tdnn_sp_ihmali: num-iters=87 nj=2..12 num-params=6.9M dim=40+100->3466 combine=-0.19->-0.18 xent:train/valid[57,86,final]=(-2.38,-2.24,-2.25/-2.75,-2.69,-2.69) logprob:train/valid[57,86,final]=(-0.19,-0.16,-0.16/-0.26,-0.26,-0.26)
# exp/sdm1/chain_cleaned/tdnn_sp: num-iters=87 nj=2..12 num-params=6.8M dim=40+100->3404 combine=-0.20->-0.20 xent:train/valid[57,86,final]=(-2.44,-2.31,-2.32/-2.74,-2.68,-2.68) logprob:train/valid[57,86,final]=(-0.19,-0.17,-0.16/-0.27,-0.27,-0.27)
# exp/sdm1/chain/tdnn_sp_ihmali: num-iters=96 nj=2..12 num-params=6.9M dim=40+100->3472 combine=-0.20->-0.20 xent:train/valid[63,95,final]=(-2.61,-2.46,-2.47/-2.79,-2.72,-2.72) logprob:train/valid[63,95,final]=(-0.21,-0.18,-0.18/-0.27,-0.27,-0.27)

# for d in exp/mdm8/tri*/decode_*pr1-7; do grep Sum $d/*scor*/*ys | utils/best_wer.sh; done

%WER 53.9 | 14278 94496 | 51.8 30.1 18.1 5.7 53.9 74.2 | 0.486 | exp/mdm8/tri2/decode_dev_ami_fsh.o3g.kn.pr1-7/ascore_13/dev_o4.ctm.filt.sys
%WER 59.6 | 13357 90001 | 45.8 32.8 21.4 5.3 59.6 75.8 | 0.455 | exp/mdm8/tri2/decode_eval_ami_fsh.o3g.kn.pr1-7/ascore_12/eval_o4.ctm.filt.sys

%WER 52.0 | 14353 94505 | 54.4 30.3 15.3 6.5 52.0 73.1 | 0.640 | exp/mdm8/tri3/decode_dev_ami_fsh.o3g.kn.pr1-7/ascore_14/dev_o4.ctm.filt.sys
%WER 56.5 | 14089 89627 | 48.3 31.6 20.1 4.8 56.5 70.9 | 0.617 | exp/mdm8/tri3/decode_eval_ami_fsh.o3g.kn.pr1-7/ascore_15/eval_o4.ctm.filt.sys

%WER 52.0 | 14354 94511 | 54.4 30.4 15.2 6.4 52.0 73.3 | 0.644 | exp/mdm8/tri3_cleaned/decode_dev_ami_fsh.o3g.kn.pr1-7/ascore_14/dev_o4.ctm.filt.sys
%WER 56.4 | 13221 89634 | 48.8 32.2 19.0 5.2 56.4 75.7 | 0.629 | exp/mdm8/tri3_cleaned/decode_eval_ami_fsh.o3g.kn.pr1-7/ascore_14/eval_o4.ctm.filt.sys


# xent TDNN with cleaned data and the mdm8 system's own alignments.
# local/nnet3/run_tdnn.sh --mic mdm8
# for d in  exp/mdm8/nnet3_cleaned/tdnn_sp_bi/decode*; do grep Sum $d/*sc*/*ys | utils/best_wer.sh; done
# %WER 40.1 | 14265 94507 | 64.9 21.8 13.3 5.1 40.1 69.1 | 0.663 | exp/mdm8/nnet3_cleaned/tdnn_sp/decode_dev/ascore_13/dev_hires_o4.ctm.filt.sys
# %WER 43.8 | 13871 89792 | 61.1 24.5 14.3 4.9 43.8 68.5 | 0.659 | exp/mdm8/nnet3_cleaned/tdnn_sp/decode_eval/ascore_11/eval_hires_o4.ctm.filt.sys


# xent TDNN system; cleaned data and IHM alignments.
# local/nnet3/run_tdnn.sh --mic mdm8  --use-ihm-ali true --stage 8
# for d in  exp/mdm8/nnet3_cleaned/tdnn_sp_ihmali/decode*; do grep Sum $d/*sc*/*ys | utils/best_wer.sh; done
%WER 38.1 | 14568 94507 | 67.2 21.3 11.5 5.3 38.1 65.8 | 0.671 | exp/mdm8/nnet3_cleaned/tdnn_sp_ihmali/decode_dev/ascore_13/dev_hires_o4.ctm.filt.sys
%WER 41.4 | 14295 89794 | 63.0 23.2 13.9 4.4 41.4 64.4 | 0.656 | exp/mdm8/nnet3_cleaned/tdnn_sp_ihmali/decode_eval/ascore_12/eval_hires_o4.ctm.filt.sys


# xent TDNN system with non-cleaned data and IHM alignments.  [cleaning only helps a little here, WER change is +0.1,+0.2]
# local/nnet3/run_tdnn.sh --use-ihm-ali true --mic mdm8 --train-set train --gmm tri3 --nnet3-affix "" --stage 12
# for d in  exp/mdm8/nnet3/tdnn_sp_ihmali/decode*; do grep Sum $d/*sc*/*ys | utils/best_wer.sh; done
%WER 38.2 | 14700 94505 | 67.0 21.2 11.8 5.2 38.2 65.1 | 0.664 | exp/mdm8/nnet3/tdnn_sp_ihmali/decode_dev/ascore_13/dev_hires_o4.ctm.filt.sys
%WER 41.6 | 13964 89980 | 62.7 23.1 14.2 4.3 41.6 65.6 | 0.649 | exp/mdm8/nnet3/tdnn_sp_ihmali/decode_eval/ascore_12/eval_hires_o4.ctm.filt.sys


############################################
# cleanup + chain TDNN model, alignments from IHM data (IHM alignments help).
# local/chain/run_tdnn.sh --mic mdm8 --use-ihm-ali true --stage 12 &
# for d in exp/mdm8/chain_cleaned/tdnn1e_sp_bi/decode_*; do grep Sum $d/*sc*/*ys | utils/best_wer.sh; done
%WER 36.0 | 14597 94517 | 67.8 17.7 14.5 3.8 36.0 64.9 | 0.623 | exp/mdm8/chain_cleaned/tdnn1e_sp_bi_ihmali/decode_dev/ascore_9/dev_hires_o4.ctm.filt.sys
%WER 39.3 | 13872 89973 | 63.9 19.0 17.1 3.2 39.3 65.1 | 0.594 | exp/mdm8/chain_cleaned/tdnn1e_sp_bi_ihmali/decode_eval/ascore_9/eval_hires_o4.ctm.filt.sys


# local/chain/run_tdnn.sh --use-ihm-ali true --mic mdm8 --train-set train --gmm tri3 --nnet3-affix "" --stage 12 &
# chain TDNN model-- no cleanup, but IHM alignments.
# note, this system is worse by [0.5, 0.5] than the system without cleanup.
# for d in exp/mdm8/chain/tdnn1d_sp_bi_ihmali/decode_*; do grep Sum $d/*sc*/*ys | utils/best_wer.sh; done
%WER 36.9 | 15282 94502 | 67.1 18.5 14.4 4.1 36.9 62.5 | 0.635 | exp/mdm8/chain/tdnn1d_sp_bi_ihmali/decode_dev/ascore_8/dev_hires_o4.ctm.filt.sys
%WER 40.2 | 13729 89992 | 63.3 19.8 17.0 3.5 40.2 66.4 | 0.608 | exp/mdm8/chain/tdnn1d_sp_bi_ihmali/decode_eval/ascore_8/eval_hires_o4.ctm.filt.sys


# local/chain/run_tdnn.sh --mic mdm8 --stage 11 &
# cleanup + chain TDNN model, alignments from mdm8 data itself.
# for d in exp/mdm8/chain_cleaned/tdnn_sp_bi/decode_*; do grep Sum $d/*sc*/*ys | utils/best_wer.sh; done
%WER 37.9 | 14471 94512 | 65.9 17.4 16.6 3.8 37.9 67.4 | 0.625 | exp/mdm8/chain_cleaned/tdnn_sp_bi/decode_dev/ascore_9/dev_hires_o4.ctm.filt.sys
%WER 41.3 | 13696 89959 | 62.0 18.6 19.4 3.3 41.3 67.2 | 0.591 | exp/mdm8/chain_cleaned/tdnn_sp_bi/decode_eval/ascore_9/eval_hires_o4.ctm.filt.sys


# local/chain/multi_condition/run_tdnn.sh --mic mdm8 --use-ihm-ali true --train-set train_cleaned --gmm tri3_cleaned
# cleanup + chain TDNN model, MDM original + IHM reverberated data, alignments from IHM data
# for d in exp/mdm8/chain_cleaned_rvb/tdnn_sp_rvb_bi_ihmali/decode_*; do grep Sum $d/*sc*/*ys | utils/best_wer.sh; done
%WER 35.8 | 14512 94498 | 68.2 17.2 14.6 4.0 35.8 64.9 | 0.632 | exp/mdm8/chain_cleaned_rvb/tdnn_sp_rvb_bi_ihmali/decode_dev/ascore_9/dev_hires_o4.ctm.filt.sys
%WER 39.1 | 13651 89967 | 64.3 18.4 17.3 3.3 39.1 65.2 | 0.607 | exp/mdm8/chain_cleaned_rvb/tdnn_sp_rvb_bi_ihmali/decode_eval/ascore_9/eval_hires_o4.ctm.filt.sys


#  local/chain/tuning/run_tdnn_lstm_1i.sh --mic mdm8 --use-ihm-ali true --train-set train_cleaned  --gmm tri3_cleaned
#  cleanup + chain TDNN+LSTM model, MDM audio and alignments from IHM data
%WER 34.6 | 15116 94508 | 69.6 17.6 12.9 4.1 34.6 62.3 | 0.687 | exp/mdm8/chain_cleaned/tdnn_lstm1i_sp_bi_ihmali_ld5/decode_dev/ascore_9/dev_hires_o4.ctm.filt.sys
%WER 37.1 | 14343 90002 | 66.3 18.8 14.9 3.4 37.1 62.3 | 0.659 | exp/mdm8/chain_cleaned/tdnn_lstm1i_sp_bi_ihmali_ld5/decode_eval/ascore_9/eval_hires_o4.ctm.filt.sys


# local/chain/multi_condition/tuning/run_tdnn_lstm_1a.sh --mic mdm8 --use-ihm-ali true --train-set train_cleaned --gmm tri3_cleaned
# cleanup + chain TDNN+LSTM model, MDM original + IHM reverberated data, alignments from IHM data
# *** best system ***
%WER 31.8 | 14488 94497 | 71.8 15.4 12.8 3.5 31.8 62.7 | 0.698 | exp/mdm8/chain_cleaned_rvb/tdnn_lstm1i_sp_rvb_bi_ihmali/decode_dev/ascore_10/dev_hires_o4.ctm.filt.sys
%WER 34.2 | 13832 89953 | 68.8 16.5 14.7 3.0 34.2 62.4 | 0.669 | exp/mdm8/chain_cleaned_rvb/tdnn_lstm1i_sp_rvb_bi_ihmali/decode_eval/ascore_10/eval_hires_o4.ctm.filt.sys

