1 #!/bin/bash
3 . ./cmd.sh ## You'll want to change cmd.sh to something that will work on your system.
4 ## This relates to the queue.
6 # This is a shell script, but it's recommended that you run the commands one by
7 # one by copying and pasting into the shell.
9 #wsj0=/ais/gobi2/speech/WSJ/csr_?_senn_d?
10 #wsj1=/ais/gobi2/speech/WSJ/csr_senn_d?
12 #wsj0=/mnt/matylda2/data/WSJ0
13 #wsj1=/mnt/matylda2/data/WSJ1
15 #wsj0=/data/corpora0/LDC93S6B
16 #wsj1=/data/corpora0/LDC94S13B
18 wsj0=/export/corpora5/LDC/LDC93S6B
19 wsj1=/export/corpora5/LDC/LDC94S13B
21 local/wsj_data_prep.sh $wsj0/??-{?,??}.? $wsj1/??-{?,??}.? || exit 1;
23 # Sometimes, we have seen WSJ distributions that do not have subdirectories
24 # like '11-13.1', but instead have 'doc', 'si_et_05', etc. directly under the
25 # wsj0 or wsj1 directories. In such cases, try the following:
26 #
27 # corpus=/exports/work/inf_hcrc_cstr_general/corpora/wsj
28 # local/cstr_wsj_data_prep.sh $corpus
29 # rm data/local/dict/lexiconp.txt
30 # $corpus must contain a 'wsj0' and a 'wsj1' subdirectory for this to work.
31 #
32 # "nosp" refers to the dictionary before silence probabilities and pronunciation
33 # probabilities are added.
34 local/wsj_prepare_dict.sh --dict-suffix "_nosp" || exit 1;
36 utils/prepare_lang.sh data/local/dict_nosp \
37 "<SPOKEN_NOISE>" data/local/lang_tmp_nosp data/lang_nosp || exit 1;
39 local/wsj_format_data.sh --lang-suffix "_nosp" || exit 1;
41 # We suggest to run the next three commands in the background,
42 # as they are not a precondition for the system building and
43 # most of the tests: these commands build a dictionary
44 # containing many of the OOVs in the WSJ LM training data,
45 # and an LM trained directly on that data (i.e. not just
46 # copying the arpa files from the disks from LDC).
47 # Caution: the commands below will only work if $decode_cmd
48 # is setup to use qsub. Else, just remove the --cmd option.
49 # NOTE: If you have a setup corresponding to the cstr_wsj_data_prep.sh style,
50 # use local/cstr_wsj_extend_dict.sh $corpus/wsj1/doc/ instead.
52 # Note: I am commenting out the RNNLM-building commands below. They take up a lot
53 # of CPU time and are not really part of the "main recipe."
54 # Be careful: appending things like "--mem 10G" to $decode_cmd
55 # won't always work, it depends what $decode_cmd is.
56 (
57 local/wsj_extend_dict.sh --dict-suffix "_nosp" $wsj1/13-32.1 && \
58 utils/prepare_lang.sh data/local/dict_nosp_larger \
59 "<SPOKEN_NOISE>" data/local/lang_tmp_nosp_larger data/lang_nosp_bd && \
60 local/wsj_train_lms.sh --dict-suffix "_nosp" &&
61 local/wsj_format_local_lms.sh --lang-suffix "_nosp" # &&
62 #
63 # ( local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
64 # --cmd "$decode_cmd --mem 10G" data/local/rnnlm.h30.voc10k &
65 # sleep 20; # wait till tools compiled.
66 # local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
67 # --cmd "$decode_cmd --mem 12G" \
68 # --hidden 100 --nwords 20000 --class 350 \
69 # --direct 1500 data/local/rnnlm.h100.voc20k &
70 # local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
71 # --cmd "$decode_cmd --mem 14G" \
72 # --hidden 200 --nwords 30000 --class 350 \
73 # --direct 1500 data/local/rnnlm.h200.voc30k &
74 # local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
75 # --cmd "$decode_cmd --mem 16G" \
76 # --hidden 300 --nwords 40000 --class 400 \
77 # --direct 2000 data/local/rnnlm.h300.voc40k &
78 # )
79 false && \ # Comment this out to train RNNLM-HS
80 (
81 num_threads_rnnlm=8
82 local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
83 --rnnlm_ver rnnlm-hs-0.1b --threads $num_threads_rnnlm \
84 --cmd "$decode_cmd --mem 1G --num-threads $num_threads_rnnlm" --bptt 4 --bptt-block 10 \
85 --hidden 30 --nwords 10000 --direct 1000 data/local/rnnlm-hs.h30.voc10k
86 local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
87 --rnnlm_ver rnnlm-hs-0.1b --threads $num_threads_rnnlm \
88 --cmd "$decode_cmd --mem 1G --num-threads $num_threads_rnnlm" --bptt 4 --bptt-block 10 \
89 --hidden 100 --nwords 20000 --direct 1500 data/local/rnnlm-hs.h100.voc20k
90 local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
91 --rnnlm_ver rnnlm-hs-0.1b --threads $num_threads_rnnlm \
92 --cmd "$decode_cmd --mem 1G --num-threads $num_threads_rnnlm" --bptt 4 --bptt-block 10 \
93 --hidden 300 --nwords 30000 --direct 1500 data/local/rnnlm-hs.h300.voc30k
94 local/wsj_train_rnnlms.sh --dict-suffix "_nosp" \
95 --rnnlm_ver rnnlm-hs-0.1b --threads $num_threads_rnnlm \
96 --cmd "$decode_cmd --mem 1G --num-threads $num_threads_rnnlm" --bptt 4 --bptt-block 10 \
97 --hidden 400 --nwords 40000 --direct 2000 data/local/rnnlm-hs.h400.voc40k
98 )
99 ) &
101 # Now make MFCC features.
102 # mfccdir should be some place with a largish disk where you
103 # want to store MFCC features.
104 mfccdir=mfcc
105 for x in test_eval92 test_eval93 test_dev93 train_si284; do
106 steps/make_mfcc.sh --cmd "$train_cmd" --nj 20 \
107 data/$x exp/make_mfcc/$x $mfccdir || exit 1;
108 steps/compute_cmvn_stats.sh data/$x exp/make_mfcc/$x $mfccdir || exit 1;
109 done
111 utils/subset_data_dir.sh --first data/train_si284 7138 data/train_si84 || exit 1
113 # Now make subset with the shortest 2k utterances from si-84.
114 utils/subset_data_dir.sh --shortest data/train_si84 2000 data/train_si84_2kshort || exit 1;
116 # Now make subset with half of the data from si-84.
117 utils/subset_data_dir.sh data/train_si84 3500 data/train_si84_half || exit 1;
120 # Note: the --boost-silence option should probably be omitted by default
121 # for normal setups. It doesn't always help. [it's to discourage non-silence
122 # models from modeling silence.]
123 steps/train_mono.sh --boost-silence 1.25 --nj 10 --cmd "$train_cmd" \
124 data/train_si84_2kshort data/lang_nosp exp/mono0a || exit 1;
126 (
127 utils/mkgraph.sh --mono data/lang_nosp_test_tgpr \
128 exp/mono0a exp/mono0a/graph_nosp_tgpr && \
129 steps/decode.sh --nj 10 --cmd "$decode_cmd" exp/mono0a/graph_nosp_tgpr \
130 data/test_dev93 exp/mono0a/decode_nosp_tgpr_dev93 && \
131 steps/decode.sh --nj 8 --cmd "$decode_cmd" exp/mono0a/graph_nosp_tgpr \
132 data/test_eval92 exp/mono0a/decode_nosp_tgpr_eval92
133 ) &
135 steps/align_si.sh --boost-silence 1.25 --nj 10 --cmd "$train_cmd" \
136 data/train_si84_half data/lang_nosp exp/mono0a exp/mono0a_ali || exit 1;
138 steps/train_deltas.sh --boost-silence 1.25 --cmd "$train_cmd" 2000 10000 \
139 data/train_si84_half data/lang_nosp exp/mono0a_ali exp/tri1 || exit 1;
141 while [ ! -f data/lang_nosp_test_tgpr/tmp/LG.fst ] || \
142 [ -z data/lang_nosp_test_tgpr/tmp/LG.fst ]; do
143 sleep 20;
144 done
145 sleep 30;
146 # or the mono mkgraph.sh might be writing
147 # data/lang_test_tgpr/tmp/LG.fst which will cause this to fail.
149 utils/mkgraph.sh data/lang_nosp_test_tgpr \
150 exp/tri1 exp/tri1/graph_nosp_tgpr || exit 1;
152 steps/decode.sh --nj 10 --cmd "$decode_cmd" exp/tri1/graph_nosp_tgpr \
153 data/test_dev93 exp/tri1/decode_nosp_tgpr_dev93 || exit 1;
154 steps/decode.sh --nj 8 --cmd "$decode_cmd" exp/tri1/graph_nosp_tgpr \
155 data/test_eval92 exp/tri1/decode_nosp_tgpr_eval92 || exit 1;
157 # test various modes of LM rescoring (4 is the default one).
158 # This is just confirming they're equivalent.
159 for mode in 1 2 3 4; do
160 steps/lmrescore.sh --mode $mode --cmd "$decode_cmd" \
161 data/lang_nosp_test_{tgpr,tg} data/test_dev93 \
162 exp/tri1/decode_nosp_tgpr_dev93 \
163 exp/tri1/decode_nosp_tgpr_dev93_tg$mode || exit 1;
164 done
166 # demonstrate how to get lattices that are "word-aligned" (arcs coincide with
167 # words, with boundaries in the right place).
168 sil_label=`grep '!SIL' data/lang_nosp_test_tgpr/words.txt | awk '{print $2}'`
169 steps/word_align_lattices.sh --cmd "$train_cmd" --silence-label $sil_label \
170 data/lang_nosp_test_tgpr exp/tri1/decode_nosp_tgpr_dev93 \
171 exp/tri1/decode_nosp_tgpr_dev93_aligned || exit 1;
173 steps/align_si.sh --nj 10 --cmd "$train_cmd" \
174 data/train_si84 data/lang_nosp exp/tri1 exp/tri1_ali_si84 || exit 1;
176 # Train tri2a, which is deltas + delta-deltas, on si84 data.
177 steps/train_deltas.sh --cmd "$train_cmd" 2500 15000 \
178 data/train_si84 data/lang_nosp exp/tri1_ali_si84 exp/tri2a || exit 1;
180 utils/mkgraph.sh data/lang_nosp_test_tgpr \
181 exp/tri2a exp/tri2a/graph_nosp_tgpr || exit 1;
183 steps/decode.sh --nj 10 --cmd "$decode_cmd" exp/tri2a/graph_nosp_tgpr \
184 data/test_dev93 exp/tri2a/decode_nosp_tgpr_dev93 || exit 1;
185 steps/decode.sh --nj 8 --cmd "$decode_cmd" exp/tri2a/graph_nosp_tgpr \
186 data/test_eval92 exp/tri2a/decode_nosp_tgpr_eval92 || exit 1;
188 utils/mkgraph.sh data/lang_nosp_test_bg_5k exp/tri2a exp/tri2a/graph_nosp_bg5k
189 steps/decode.sh --nj 8 --cmd "$decode_cmd" exp/tri2a/graph_nosp_bg5k \
190 data/test_eval92 exp/tri2a/decode_nosp_eval92_bg5k || exit 1;
192 steps/train_lda_mllt.sh --cmd "$train_cmd" \
193 --splice-opts "--left-context=3 --right-context=3" 2500 15000 \
194 data/train_si84 data/lang_nosp exp/tri1_ali_si84 exp/tri2b || exit 1;
196 utils/mkgraph.sh data/lang_nosp_test_tgpr \
197 exp/tri2b exp/tri2b/graph_nosp_tgpr || exit 1;
198 steps/decode.sh --nj 10 --cmd "$decode_cmd" exp/tri2b/graph_nosp_tgpr \
199 data/test_dev93 exp/tri2b/decode_nosp_tgpr_dev93 || exit 1;
200 steps/decode.sh --nj 8 --cmd "$decode_cmd" exp/tri2b/graph_nosp_tgpr \
201 data/test_eval92 exp/tri2b/decode_nosp_tgpr_eval92 || exit 1;
203 # At this point, you could run the example scripts that show how VTLN works.
204 # We haven't included this in the default recipes yet.
205 # local/run_vtln.sh --lang-suffix "_nosp"
206 # local/run_vtln2.sh --lang-suffix "_nosp"
208 # Now, with dev93, compare lattice rescoring with biglm decoding,
209 # going from tgpr to tg. Note: results are not the same, even though they should
210 # be, and I believe this is due to the beams not being wide enough. The pruning
211 # seems to be a bit too narrow in the current scripts (got at least 0.7% absolute
212 # improvement from loosening beams from their current values).
214 steps/decode_biglm.sh --nj 10 --cmd "$decode_cmd" \
215 exp/tri2b/graph_nosp_tgpr data/lang_test_{tgpr,tg}/G.fst \
216 data/test_dev93 exp/tri2b/decode_nosp_tgpr_dev93_tg_biglm
218 # baseline via LM rescoring of lattices.
219 steps/lmrescore.sh --cmd "$decode_cmd" \
220 data/lang_nosp_test_tgpr/ data/lang_nosp_test_tg/ \
221 data/test_dev93 exp/tri2b/decode_nosp_tgpr_dev93 \
222 exp/tri2b/decode_nosp_tgpr_dev93_tg || exit 1;
224 # Trying Minimum Bayes Risk decoding (like Confusion Network decoding):
225 mkdir exp/tri2b/decode_nosp_tgpr_dev93_tg_mbr
226 cp exp/tri2b/decode_nosp_tgpr_dev93_tg/lat.*.gz \
227 exp/tri2b/decode_nosp_tgpr_dev93_tg_mbr
228 local/score_mbr.sh --cmd "$decode_cmd" \
229 data/test_dev93/ data/lang_nosp_test_tgpr/ \
230 exp/tri2b/decode_nosp_tgpr_dev93_tg_mbr
232 steps/decode_fromlats.sh --cmd "$decode_cmd" \
233 data/test_dev93 data/lang_nosp_test_tgpr exp/tri2b/decode_nosp_tgpr_dev93 \
234 exp/tri2a/decode_nosp_tgpr_dev93_fromlats || exit 1
236 # Align tri2b system with si84 data.
237 steps/align_si.sh --nj 10 --cmd "$train_cmd" \
238 --use-graphs true data/train_si84 \
239 data/lang_nosp exp/tri2b exp/tri2b_ali_si84 || exit 1;
241 local/run_mmi_tri2b.sh --lang-suffix "_nosp"
243 # From 2b system, train 3b which is LDA + MLLT + SAT.
244 steps/train_sat.sh --cmd "$train_cmd" 2500 15000 \
245 data/train_si84 data/lang_nosp exp/tri2b_ali_si84 exp/tri3b || exit 1;
246 utils/mkgraph.sh data/lang_nosp_test_tgpr \
247 exp/tri3b exp/tri3b/graph_nosp_tgpr || exit 1;
248 steps/decode_fmllr.sh --nj 10 --cmd "$decode_cmd" \
249 exp/tri3b/graph_nosp_tgpr data/test_dev93 \
250 exp/tri3b/decode_nosp_tgpr_dev93 || exit 1;
251 steps/decode_fmllr.sh --nj 8 --cmd "$decode_cmd" \
252 exp/tri3b/graph_nosp_tgpr data/test_eval92 \
253 exp/tri3b/decode_nosp_tgpr_eval92 || exit 1;
255 # At this point you could run the command below; this gets
256 # results that demonstrate the basis-fMLLR adaptation (adaptation
257 # on small amounts of adaptation data).
258 local/run_basis_fmllr.sh --lang-suffix "_nosp"
260 steps/lmrescore.sh --cmd "$decode_cmd" \
261 data/lang_nosp_test_tgpr data/lang_nosp_test_tg \
262 data/test_dev93 exp/tri3b/decode_nosp_tgpr_dev93 \
263 exp/tri3b/decode_nosp_tgpr_dev93_tg || exit 1;
264 steps/lmrescore.sh --cmd "$decode_cmd" \
265 data/lang_nosp_test_tgpr data/lang_nosp_test_tg \
266 data/test_eval92 exp/tri3b/decode_nosp_tgpr_eval92 \
267 exp/tri3b/decode_nosp_tgpr_eval92_tg || exit 1;
269 # Trying the larger dictionary ("big-dict"/bd) + locally produced LM.
270 utils/mkgraph.sh data/lang_nosp_test_bd_tgpr \
271 exp/tri3b exp/tri3b/graph_nosp_bd_tgpr || exit 1;
273 steps/decode_fmllr.sh --cmd "$decode_cmd" --nj 8 \
274 exp/tri3b/graph_nosp_bd_tgpr data/test_eval92 \
275 exp/tri3b/decode_nosp_bd_tgpr_eval92 || exit 1;
276 steps/decode_fmllr.sh --cmd "$decode_cmd" --nj 10 \
277 exp/tri3b/graph_nosp_bd_tgpr data/test_dev93 \
278 exp/tri3b/decode_nosp_bd_tgpr_dev93 || exit 1;
280 # Example of rescoring with ConstArpaLm.
281 steps/lmrescore_const_arpa.sh \
282 --cmd "$decode_cmd" data/lang_nosp_test_bd_{tgpr,fgconst} \
283 data/test_eval92 exp/tri3b/decode_nosp_bd_tgpr_eval92{,_fgconst} || exit 1;
285 steps/lmrescore.sh --cmd "$decode_cmd" \
286 data/lang_nosp_test_bd_tgpr data/lang_nosp_test_bd_fg \
287 data/test_eval92 exp/tri3b/decode_nosp_bd_tgpr_eval92 \
288 exp/tri3b/decode_nosp_bd_tgpr_eval92_fg || exit 1;
289 steps/lmrescore.sh --cmd "$decode_cmd" \
290 data/lang_nosp_test_bd_tgpr data/lang_nosp_test_bd_tg \
291 data/test_eval92 exp/tri3b/decode_nosp_bd_tgpr_eval92 \
292 exp/tri3b/decode_nosp_bd_tgpr_eval92_tg || exit 1;
294 # The command below is commented out as we commented out the steps above
295 # that build the RNNLMs, so it would fail.
296 # local/run_rnnlms_tri3b.sh --lang-suffix "_nosp"
298 # The command below is commented out as we commented out the steps above
299 # that build the RNNLMs (HS version), so it would fail.
300 # wait; local/run_rnnlm-hs_tri3b.sh --lang-suffix "_nosp"
302 # The following two steps, which are a kind of side-branch, try mixing up
303 ( # from the 3b system. This is to demonstrate that script.
304 steps/mixup.sh --cmd "$train_cmd" \
305 20000 data/train_si84 data/lang_nosp exp/tri3b exp/tri3b_20k || exit 1;
306 steps/decode_fmllr.sh --cmd "$decode_cmd" --nj 10 \
307 exp/tri3b/graph_nosp_tgpr data/test_dev93 \
308 exp/tri3b_20k/decode_nosp_tgpr_dev93 || exit 1;
309 )
311 # From 3b system, align all si284 data.
312 steps/align_fmllr.sh --nj 20 --cmd "$train_cmd" \
313 data/train_si284 data/lang_nosp exp/tri3b exp/tri3b_ali_si284 || exit 1;
316 # From 3b system, train another SAT system (tri4a) with all the si284 data.
318 steps/train_sat.sh --cmd "$train_cmd" 4200 40000 \
319 data/train_si284 data/lang_nosp exp/tri3b_ali_si284 exp/tri4a || exit 1;
320 (
321 utils/mkgraph.sh data/lang_nosp_test_tgpr \
322 exp/tri4a exp/tri4a/graph_nosp_tgpr || exit 1;
323 steps/decode_fmllr.sh --nj 10 --cmd "$decode_cmd" \
324 exp/tri4a/graph_nosp_tgpr data/test_dev93 \
325 exp/tri4a/decode_nosp_tgpr_dev93 || exit 1;
326 steps/decode_fmllr.sh --nj 8 --cmd "$decode_cmd" \
327 exp/tri4a/graph_nosp_tgpr data/test_eval92 \
328 exp/tri4a/decode_nosp_tgpr_eval92 || exit 1;
329 ) &
332 # This step is just to demonstrate the train_quick.sh script, in which we
333 # initialize the GMMs from the old system's GMMs.
334 steps/train_quick.sh --cmd "$train_cmd" 4200 40000 \
335 data/train_si284 data/lang_nosp exp/tri3b_ali_si284 exp/tri4b || exit 1;
337 (
338 utils/mkgraph.sh data/lang_nosp_test_tgpr \
339 exp/tri4b exp/tri4b/graph_nosp_tgpr || exit 1;
340 steps/decode_fmllr.sh --nj 10 --cmd "$decode_cmd" \
341 exp/tri4b/graph_nosp_tgpr data/test_dev93 \
342 exp/tri4b/decode_nosp_tgpr_dev93 || exit 1;
343 steps/decode_fmllr.sh --nj 8 --cmd "$decode_cmd" \
344 exp/tri4b/graph_nosp_tgpr data/test_eval92 \
345 exp/tri4b/decode_nosp_tgpr_eval92 || exit 1;
347 utils/mkgraph.sh data/lang_nosp_test_bd_tgpr \
348 exp/tri4b exp/tri4b/graph_nosp_bd_tgpr || exit 1;
349 steps/decode_fmllr.sh --nj 10 --cmd "$decode_cmd" \
350 exp/tri4b/graph_nosp_bd_tgpr data/test_dev93 \
351 exp/tri4b/decode_nosp_bd_tgpr_dev93 || exit 1;
352 steps/decode_fmllr.sh --nj 8 --cmd "$decode_cmd" \
353 exp/tri4b/graph_nosp_bd_tgpr data/test_eval92 \
354 exp/tri4b/decode_nosp_bd_tgpr_eval92 || exit 1;
355 ) &
357 # Silprob for normal lexicon.
358 steps/get_prons.sh --cmd "$train_cmd" \
359 data/train_si284 data/lang_nosp exp/tri4b || exit 1;
360 utils/dict_dir_add_pronprobs.sh --max-normalize true \
361 data/local/dict_nosp \
362 exp/tri4b/pron_counts_nowb.txt exp/tri4b/sil_counts_nowb.txt \
363 exp/tri4b/pron_bigram_counts_nowb.txt data/local/dict || exit 1
365 utils/prepare_lang.sh data/local/dict \
366 "<SPOKEN_NOISE>" data/local/lang_tmp data/lang || exit 1;
368 for lm_suffix in bg bg_5k tg tg_5k tgpr tgpr_5k; do
369 mkdir -p data/lang_test_${lm_suffix}
370 cp -r data/lang/* data/lang_test_${lm_suffix}/ || exit 1;
371 rm -rf data/lang_test_${lm_suffix}/tmp
372 cp data/lang_nosp_test_${lm_suffix}/G.* data/lang_test_${lm_suffix}/
373 done
375 # Silprob for larger lexicon.
376 utils/dict_dir_add_pronprobs.sh --max-normalize true \
377 data/local/dict_nosp_larger \
378 exp/tri4b/pron_counts_nowb.txt exp/tri4b/sil_counts_nowb.txt \
379 exp/tri4b/pron_bigram_counts_nowb.txt data/local/dict_larger || exit 1
381 utils/prepare_lang.sh data/local/dict_larger \
382 "<SPOKEN_NOISE>" data/local/lang_tmp_larger data/lang_bd || exit 1;
384 for lm_suffix in tgpr tgconst tg fgpr fgconst fg; do
385 mkdir -p data/lang_test_bd_${lm_suffix}
386 cp -r data/lang_bd/* data/lang_test_bd_${lm_suffix}/ || exit 1;
387 rm -rf data/lang_test_bd_${lm_suffix}/tmp
388 cp data/lang_nosp_test_bd_${lm_suffix}/G.* data/lang_test_bd_${lm_suffix}/
389 done
391 (
392 utils/mkgraph.sh data/lang_test_tgpr exp/tri4b exp/tri4b/graph_tgpr || exit 1;
393 steps/decode_fmllr.sh --nj 10 --cmd "$decode_cmd" \
394 exp/tri4b/graph_tgpr data/test_dev93 exp/tri4b/decode_tgpr_dev93 || exit 1;
395 steps/decode_fmllr.sh --nj 8 --cmd "$decode_cmd" \
396 exp/tri4b/graph_tgpr data/test_eval92 exp/tri4b/decode_tgpr_eval92 || exit 1;
398 utils/mkgraph.sh data/lang_test_bd_tgpr \
399 exp/tri4b exp/tri4b/graph_bd_tgpr || exit 1;
400 steps/decode_fmllr.sh --nj 10 --cmd "$decode_cmd" \
401 exp/tri4b/graph_bd_tgpr data/test_dev93 \
402 exp/tri4b/decode_bd_tgpr_dev93 || exit 1;
403 steps/decode_fmllr.sh --nj 8 --cmd "$decode_cmd" \
404 exp/tri4b/graph_bd_tgpr data/test_eval92 \
405 exp/tri4b/decode_bd_tgpr_eval92 || exit 1;
406 ) &
409 # Train and test MMI, and boosted MMI, on tri4b (LDA+MLLT+SAT on
410 # all the data). Use 30 jobs.
411 steps/align_fmllr.sh --nj 30 --cmd "$train_cmd" \
412 data/train_si284 data/lang exp/tri4b exp/tri4b_ali_si284 || exit 1;
414 # These demonstrate how to build a sytem usable for online-decoding with the nnet2 setup.
415 # (see local/run_nnet2.sh for other, non-online nnet2 setups).
416 local/online/run_nnet2.sh
417 local/online/run_nnet2_baseline.sh
418 local/online/run_nnet2_discriminative.sh
420 local/run_mmi_tri4b.sh
422 #local/run_nnet2.sh
424 ## Segregated some SGMM builds into a separate file.
425 #local/run_sgmm.sh
427 # You probably want to run the sgmm2 recipe as it's generally a bit better:
428 local/run_sgmm2.sh
430 # We demonstrate MAP adaptation of GMMs to gender-dependent systems here. This also serves
431 # as a generic way to demonstrate MAP adaptation to different domains.
432 # local/run_gender_dep.sh
434 # You probably want to run the hybrid recipe as it is complementary:
435 local/nnet/run_dnn.sh
437 # The following demonstrate how to re-segment long audios.
438 # local/run_segmentation.sh
440 # The next two commands show how to train a bottleneck network based on the nnet2 setup,
441 # and build an SGMM system on top of it.
442 #local/run_bnf.sh
443 #local/run_bnf_sgmm.sh
446 # You probably want to try KL-HMM
447 #local/run_kl_hmm.sh
449 # Getting results [see RESULTS file]
450 # for x in exp/*/decode*; do [ -d $x ] && grep WER $x/wer_* | utils/best_wer.sh; done
453 # KWS setup. We leave it commented out by default
455 # $duration is the length of the search collection, in seconds
456 #duration=`feat-to-len scp:data/test_eval92/feats.scp ark,t:- | awk '{x+=$2} END{print x/100;}'`
457 #local/generate_example_kws.sh data/test_eval92/ data/kws/
458 #local/kws_data_prep.sh data/lang_test_bd_tgpr/ data/test_eval92/ data/kws/
459 #
460 #steps/make_index.sh --cmd "$decode_cmd" --acwt 0.1 \
461 # data/kws/ data/lang_test_bd_tgpr/ \
462 # exp/tri4b/decode_bd_tgpr_eval92/ \
463 # exp/tri4b/decode_bd_tgpr_eval92/kws
464 #
465 #steps/search_index.sh --cmd "$decode_cmd" \
466 # data/kws \
467 # exp/tri4b/decode_bd_tgpr_eval92/kws
468 #
469 # If you want to provide the start time for each utterance, you can use the --segments
470 # option. In WSJ each file is an utterance, so we don't have to set the start time.
471 #cat exp/tri4b/decode_bd_tgpr_eval92/kws/result.* | \
472 # utils/write_kwslist.pl --flen=0.01 --duration=$duration \
473 # --normalize=true --map-utter=data/kws/utter_map \
474 # - exp/tri4b/decode_bd_tgpr_eval92/kws/kwslist.xml
476 # # forward-backward decoding example [way to speed up decoding by decoding forward
477 # # and backward in time]
478 # local/run_fwdbwd.sh