comparison trunk/experiments/scripts/master.sh @ 379:646d104de415

- AWS
author tomwalters
date Sat, 14 Aug 2010 19:23:34 +0000
parents d318c1eb9a43
children e6f006238034
comparison
equal deleted inserted replaced
378:b5b99c270f58 379:646d104de415
10 # The following environment varaibles should be set before this script is run: 10 # The following environment varaibles should be set before this script is run:
11 # SYLLABLES_DATABASE_URL - URL of a tar file containing the CNBH syllables 11 # SYLLABLES_DATABASE_URL - URL of a tar file containing the CNBH syllables
12 # database in FLAC format 12 # database in FLAC format
13 # HTK_USERNAME and HTK_PASSWORD - username and password for the site at 13 # HTK_USERNAME and HTK_PASSWORD - username and password for the site at
14 # http://htk.eng.cam.ac.uk/ 14 # http://htk.eng.cam.ac.uk/
15 # NUMBER_OF_CORES - total number of machine cores
15 16
16 # Set these to be the location of your input database, and desired output 17 # Set these to be the location of your input database, and desired output
17 # locations. 18 # locations.
18 SYLLABLES_DATABASE_TAR=/mnt/sounds/cnbh-syllables.tar 19 SYLLABLES_DATABASE_TAR=/mnt/sounds/cnbh-syllables.tar
19 SOUNDS_ROOT=/mnt/experiments/sounds/ 20 SOUNDS_ROOT=/mnt/experiments/sounds/
20 FEATURES_ROOT=/mnt/experiments/features/ 21 FEATURES_ROOT=/mnt/experiments/features/
21 HMMS_ROOT=/mnt/experiments/hmms/ 22 HMMS_ROOT=/mnt/experiments/hmms/
22 23
23 # Number of cores on the experimental machine. Various scripts will try to use 24 # Number of cores on the experimental machine. Various scripts will try to use
24 # this if it's set. 25 # this if it's set.
25 NUMBER_OF_CORES=8 26 # NUMBER_OF_CORES=8
26 27
27 # Fail if any command fails 28 # Fail if any command fails
28 set -e 29 set -e
29 30
30 # Fail if any variable is unset 31 # Fail if any variable is unset
92 if [ ! -e $FEATURES_ROOT/mfcc/$SOURCE_SNR/.make_mfcc_features_success ]; then 93 if [ ! -e $FEATURES_ROOT/mfcc/$SOURCE_SNR/.make_mfcc_features_success ]; then
93 mkdir -p $FEATURES_ROOT/mfcc/$SOURCE_SNR/ 94 mkdir -p $FEATURES_ROOT/mfcc/$SOURCE_SNR/
94 # Generate the list of files to convert 95 # Generate the list of files to convert
95 ./cnbh-syllables/feature_generation/gen_hcopy_aimcopy_script.sh $FEATURES_ROOT/mfcc/$SOURCE_SNR/ $SOUNDS_ROOT/$SOURCE_SNR/ htk 96 ./cnbh-syllables/feature_generation/gen_hcopy_aimcopy_script.sh $FEATURES_ROOT/mfcc/$SOURCE_SNR/ $SOUNDS_ROOT/$SOURCE_SNR/ htk
96 # Run the conversion 97 # Run the conversion
97 ./cnbh-syllables/feature_generation/run_hcopy.sh $FEATURES_ROOT/mfcc/$SOURCE_SNR/ $NUMBER_OF_CORES 98 #./cnbh-syllables/feature_generation/run_hcopy.sh $FEATURES_ROOT/mfcc/$SOURCE_SNR/ $NUMBER_OF_CORES
98 touch $FEATURES_ROOT/mfcc/$SOURCE_SNR/.make_mfcc_features_success 99 #touch $FEATURES_ROOT/mfcc/$SOURCE_SNR/.make_mfcc_features_success
99 fi 100 fi
100 101
101 if [ ! -e $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/.make_mfcc_vtln_features_success ]; then 102 if [ ! -e $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/.make_mfcc_vtln_features_success ]; then
102 mkdir -p $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/ 103 mkdir -p $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/
103 # Generate the file list and run the conversion (all one step, since this 104 # Generate the file list and run the conversion (all one step, since this
104 # version uses a different configuration for each talker) 105 # version uses a different configuration for each talker)
105 ./cnbh-syllables/feature_generation/run_mfcc_vtln_conversion.sh $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/ $SOUNDS_ROOT/$SOURCE_SNR/ 106 #./cnbh-syllables/feature_generation/run_mfcc_vtln_conversion.sh $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/ $SOUNDS_ROOT/$SOURCE_SNR/
106 touch $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/.make_mfcc_vtln_features_success 107 #touch $FEATURES_ROOT/mfcc_vtln/$SOURCE_SNR/.make_mfcc_vtln_features_success
107 fi 108 fi
108 109
109 if [ ! -e $FEATURES_ROOT/aim/$SOURCE_SNR/.make_aim_features_success ]; then 110 if [ ! -e $FEATURES_ROOT/aim/$SOURCE_SNR/.make_aim_features_success ]; then
110 mkdir -p $FEATURES_ROOT/aim/$SOURCE_SNR/ 111 mkdir -p $FEATURES_ROOT/aim/$SOURCE_SNR/
111 ./cnbh-syllables/feature_generation/gen_hcopy_aimcopy_script.sh $FEATURES_ROOT/aim/$SOURCE_SNR/ $SOUNDS_ROOT/$SOURCE_SNR/ "" 112 ./cnbh-syllables/feature_generation/gen_hcopy_aimcopy_script.sh $FEATURES_ROOT/aim/$SOURCE_SNR/ $SOUNDS_ROOT/$SOURCE_SNR/ ""
112 # Run the conversion 113 # Run the conversion
113 #./cnbh-syllables/feature_generation/run_aimcopy.sh $FEATURES_ROOT/aim/$SOURCE_SNR/ $NUMBER_OF_CORES 114 ./cnbh-syllables/feature_generation/run_aimcopy.sh $FEATURES_ROOT/aim/$SOURCE_SNR/ $NUMBER_OF_CORES
114 #touch $FEATURES_ROOT/aim/$SOURCE_SNR/.make_aim_features_success 115 touch $FEATURES_ROOT/aim/$SOURCE_SNR/.make_aim_features_success
115 fi 116 fi
116 done 117 done
117 118
118 sudo mkdir -p $HMMS_ROOT 119 sudo mkdir -p $HMMS_ROOT
119 sudo chown ubuntu $HMMS_ROOT 120 sudo chown ubuntu $HMMS_ROOT
124 TRAINING_ITERATIONS="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20" 125 TRAINING_ITERATIONS="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
125 TESTING_ITERATIONS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20" 126 TESTING_ITERATIONS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
126 HMM_STATES="3 4 5 6 7 8" 127 HMM_STATES="3 4 5 6 7 8"
127 HMM_OUTPUT_COMPONENTS="1 2 3 4 5 6 7" 128 HMM_OUTPUT_COMPONENTS="1 2 3 4 5 6 7"
128 129
130 return 0
129 131
130 run_train_test () { 132 run_train_test () {
131 # TODO(tom): Make sure that the training SNR is generated first 133 # TODO(tom): Make sure that the training SNR is generated first
132 for SOURCE_SNR in $FEATURE_DIRS; do 134 for SOURCE_SNR in $FEATURE_DIRS; do
133 WORK=$HMMS_ROOT/$FEATURE_CLASS/$FEATURE_SUFFIX/$SOURCE_SNR/$TALKERS/ 135 WORK=$HMMS_ROOT/$FEATURE_CLASS/$FEATURE_SUFFIX/$SOURCE_SNR/$TALKERS/