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 76 77 78 79 80 81 82 83 84
|
#!/bin/csh -f
set files_dir = n95
#learning: either em or viterbi
set type_of_learning = $1
#type of models: either mono (monophones) or tri (triphones)
set phonemes = $2
#either save or load model
if ( $3 == "load" ) then
set save_or_load = "-lm "
else
set save_or_load = "-sm "
endif
#number of iterations of initial model training
set initial_aligned_training_iter = $4
#is the initialization linear of using alignment: either linear of not
set linear_or_not = $5
if ( $linear_or_not == "linear" ) then
set align_type = " "
set linear = "_linear"
else
set align_type = " -train_alignment $files_dir/train_align_$phonemes "
set linear = ""
endif
#number of EM iteration for training
set n_iter = 40
#number of EM iteration for kmeans initialization
set n_iter_k = 100
#number of gaussians in each HMM state
set n_gaussians = 10
#word entrance penalty is used to penalize long sentences. zero: does nothing
set word_entrance_penalty = -15
#the relative minimum variance allowed in each gaussian (relative to
#global variance)
set threshold = 0.2
#which version of the code do we use
set plat = Linux_OPT_FLOAT
#set plat = Linux_DBG_FLOAT
#the name of the file where the output of program is put
set res_file = "res_"$type_of_learning"_"$phonemes"_"$initial_aligned_training_iter$linear
if ( $3 == "load" ) then
set res_file = $res_file"_load"
endif
#the directory in which all the results will go
set dir = $type_of_learning"_"$phonemes"_"$initial_aligned_training_iter$linear
set setdir = " -dir "$dir
set learning = " "
if ( $type_of_learning == "viterbi" ) then
set learning = " -viterbi "
endif
mkdir -p $dir
#the directory where the data resides
set data_dir = /home/temp_chatelet/numbers/katrin/MFCC/clean/
#set data_dir = /home/bengio/n95
#do we load just part of the data? how many sentences?
#set load = "-load_train 10 -load_test 10"
set load = ""
#this is the actual command that will be executed
set command = "/usr/local/bin/nice -n 19 /usr/bin/time -p $plat/hmm_speech -initial_aligned_training_iter $initial_aligned_training_iter -word_entrance_penalty $word_entrance_penalty -iter $n_iter -iterk $n_iter_k $load $setdir $learning $align_type $save_or_load hmm_model -htk -big_endian -n_gaussians $n_gaussians -threshold $threshold -data_dir $data_dir $files_dir/phonemes_$phonemes $files_dir/dict_$phonemes $files_dir/train_files $files_dir/train_word $files_dir/devt_files $files_dir/devt_word"
#we save the command in the res file
echo $command >& $res_file
#and we execute it! (and put the results in the res file)
$command >>& $res_file
|