Mercurial > hg > aimc
annotate experiments/scripts/cnbh-syllables/run_training_and_testing/test_features.sh @ 186:5664f16368c1
- AWS fixen
author | tomwalters |
---|---|
date | Wed, 11 Aug 2010 17:29:51 +0000 |
parents | f75123cf39ce |
children | d7dc7014b0af |
rev | line source |
---|---|
tomwalters@54 | 1 #!/bin/bash |
tomwalters@54 | 2 # |
tomwalters@54 | 3 # Train and test an HTK monophone model using AIM or MFCC |
tomwalters@54 | 4 # features and the CNBH syllable databse |
tomwalters@54 | 5 # |
tomwalters@54 | 6 # Copyright 2009-2010 University of Cambridge |
tomwalters@54 | 7 # Author: Thomas Walters <tom@acousticscale.org> |
tomwalters@165 | 8 # |
tomwalters@54 | 9 # Run multiple HMMs |
tomwalters@54 | 10 |
tomwalters@54 | 11 set -e |
tomwalters@54 | 12 set -u |
tomwalters@54 | 13 |
tomwalters@54 | 14 WORKING_DIRECTORY=$1 |
tomwalters@54 | 15 FEATURE_SOURCE=$2 |
tomwalters@54 | 16 FEATURE_SUFFIX=$3 |
tomwalters@54 | 17 HMM_STATES_LIST=$4 |
tomwalters@54 | 18 MIXTURE_COMPONENTS_LIST=$5 |
tomwalters@54 | 19 TRAINING_ITERATIONS_LIST=$6 |
tomwalters@54 | 20 TESTING_ITERATIONS_LIST=$7 |
tomwalters@165 | 21 FEATURE_SIZE=$8 |
tomwalters@165 | 22 FEATURE_TYPE=$9 |
tomwalters@54 | 23 |
tomwalters@54 | 24 |
tomwalters@165 | 25 TRAIN_SPEAKERS=train_speakers |
tomwalters@165 | 26 TEST_SPEAKERS=test_speakers |
tomwalters@54 | 27 |
tomwalters@165 | 28 # These are not |
tomwalters@165 | 29 SYLLIST_COMPLETE=syllist |
tomwalters@165 | 30 GRAM=gram |
tomwalters@165 | 31 DICT=dict |
tomwalters@165 | 32 WDNET=wdnet |
tomwalters@165 | 33 TRAIN_MLF=train.mlf |
tomwalters@165 | 34 TEST_MLF=test.mlf |
tomwalters@165 | 35 HMMCONFIG=hmmconfig |
tomwalters@165 | 36 |
tomwalters@165 | 37 |
tomwalters@186 | 38 if [ "$FEATURE_TYPE" == "MFCC_0_D_A"] |
tomwalters@54 | 39 then |
tomwalters@165 | 40 cat <<"EOF" > $WORK/$HMMCONFIG |
tomwalters@54 | 41 # Coding parameters |
tomwalters@54 | 42 SOURCEFORMAT= HTK |
tomwalters@54 | 43 EOF |
tomwalters@54 | 44 else |
tomwalters@165 | 45 cat <<"EOF" > $WORK/$HMMCONFIG |
tomwalters@54 | 46 # Coding parameters |
tomwalters@54 | 47 # The TARGETKIND and SOURCEKIND lines are to add deltas and delta-deltas to |
tomwalters@54 | 48 # the AIM features |
tomwalters@54 | 49 SOURCEFORMAT= HTK |
tomwalters@54 | 50 SOURCEKIND= USER_E |
tomwalters@54 | 51 TARGETKIND = USER_E_D_A |
tomwalters@54 | 52 EOF |
tomwalters@54 | 53 fi |
tomwalters@54 | 54 |
tomwalters@165 | 55 for total_hmm_states in 3 4 5 6 7 8; do |
tomwalters@165 | 56 for mixture_components in 1 2 3 4 5 6 7; do |
tomwalters@165 | 57 . run_test_instance.sh & |
tomwalters@54 | 58 done |
tomwalters@54 | 59 done |
tomwalters@54 | 60 echo "Waiting..." |
tomwalters@54 | 61 wait |
tomwalters@54 | 62 |