forked from nassosoassos/spanish_voxforge_htk_asr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go_flat_cross.sh
executable file
·77 lines (62 loc) · 2.37 KB
/
go_flat_cross.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Trains up cross word models using a flat start on WSJ0 data only.
echo "Training cross word flat start triphones"
echo ""
echo "Environment variables:"
echo "TRAIN_TIMIT = $TRAIN_TIMIT"
echo "TRAIN_WSJ0 = $TRAIN_WSJ0"
echo "TRAIN_COMMON = $TRAIN_COMMON"
echo "TRAIN_SCRIPTS = $TRAIN_SCRIPTS"
echo "TIMIT_DIR = $TIMIT_DIR"
echo "WSJ0_DIR = $WSJ0_DIR"
echo "WSJ_ROOT = $WSJ_ROOT"
echo "HEREST_SPLIT = $HEREST_SPLIT"
echo "HEREST_THREADS = $HEREST_THREADS"
echo ""
# We need to massage the CMU dictionary for our use
echo "Preparing CMU dictionary..."
cd $TRAIN_TIMIT
$TRAIN_TIMIT/prep_cmu_dict.sh
cd $TRAIN_WSJ0
# Code the audio files to MFCC feature vectors
echo "Coding audio..."
$TRAIN_WSJ0/prep.sh
echo "Coding Nov92 audio..."
$TRAIN_WSJ0/prep_nov92.sh
# Intial setup of language model, dictionary, training and test MLFs
echo "Building language models and dictionary..."
$TRAIN_WSJ0/build_lm.sh
echo "Building training MLF..."
$TRAIN_WSJ0/make_mlf.sh
echo "Building test MLF..."
$TRAIN_WSJ0/make_mlf_nov92.sh
# Get the basic monophone models trained
echo "Flat starting monophones..."
$TRAIN_WSJ0/flat_start.sh
# Create a new MLF that is aligned based on our monophone model
echo "Aligning with monophones..."
$TRAIN_WSJ0/align_mlf.sh flat
# More training for the monophones, create triphones, train
# triphones, tie the triphones, train tied triphones, then
# mixup the number of Gaussians per state.
echo "Training monophones..."
$TRAIN_WSJ0/train_mono.sh flat
echo "Prepping triphones..."
$TRAIN_WSJ0/prep_tri.sh cross
echo "Training triphones..."
$TRAIN_WSJ0/train_tri.sh
echo "Prepping state-tied triphones..."
$TRAIN_WSJ0/prep_tied.sh 200 750 cross
echo "Training state-tied triphones..."
$TRAIN_WSJ0/train_tied.sh
echo "Mixing up..."
$TRAIN_WSJ0/train_mixup.sh
# Evaluate how we did, also produces lattics we use for tuning
echo "Evaluating on Nov92 test set..."
$TRAIN_WSJ0/eval_nov92.sh hmm42 _ro200_tb750_prune250_flat_cross 250.0 -4.0 15.0 cross
# Tune the insertion penalty and language model scale factor
echo "Tuning insertion penalty and scale factor..."
$TRAIN_WSJ0/tune.sh cross
# You can probably now increase results slightly by running
# the best penalty and scale factor with a higher beam width,
# say 350.0. Then relax and have a beer- you've earned it.
$TRAIN_WSJ0/eval_nov92_no_lat.sh hmm42 _ro200_tb750_prune350_flat_cross 350.0 -4.0 15.0 cross