tomwalters@54: #!/bin/bash tomwalters@54: # tomwalters@54: # Train and test an HTK monophone model using AIM or MFCC tomwalters@54: # features and the CNBH syllable databse tomwalters@54: # tomwalters@54: # Copyright 2009-2010 University of Cambridge tomwalters@54: # Author: Thomas Walters tomwalters@165: # tomwalters@54: # Run multiple HMMs tomwalters@54: tomwalters@54: set -e tomwalters@54: set -u tomwalters@54: tomwalters@54: WORKING_DIRECTORY=$1 tomwalters@54: FEATURE_SOURCE=$2 tomwalters@54: FEATURE_SUFFIX=$3 tomwalters@54: HMM_STATES_LIST=$4 tomwalters@54: MIXTURE_COMPONENTS_LIST=$5 tomwalters@54: TRAINING_ITERATIONS_LIST=$6 tomwalters@54: TESTING_ITERATIONS_LIST=$7 tomwalters@193: input_vector_size=$8 tomwalters@193: feature_code=$9 tomwalters@196: TRAIN_SPEAKERS=${10} tomwalters@196: TEST_SPEAKERS=${11} tomwalters@202: TRAIN_MLF=${12} tomwalters@202: tomwalters@54: tomwalters@187: HMMCONFIG=hmm_configuration tomwalters@165: tomwalters@193: THIS_DIR=`dirname $0` tomwalters@165: tomwalters@194: if [ "$feature_code" == "MFCC_0_D_A" ] tomwalters@54: then tomwalters@193: cat <<"EOF" > $WORKING_DIRECTORY/$HMMCONFIG tomwalters@54: # Coding parameters tomwalters@54: SOURCEFORMAT= HTK tomwalters@54: EOF tomwalters@54: else tomwalters@193: cat <<"EOF" > $WORKING_DIRECTORY/$HMMCONFIG tomwalters@54: # Coding parameters tomwalters@54: # The TARGETKIND and SOURCEKIND lines are to add deltas and delta-deltas to tomwalters@54: # the AIM features tomwalters@54: SOURCEFORMAT= HTK tomwalters@54: SOURCEKIND= USER_E tomwalters@54: TARGETKIND = USER_E_D_A tomwalters@54: EOF tomwalters@54: fi tomwalters@54: tomwalters@187: for total_hmm_states in $HMM_STATES_LIST; do tomwalters@187: for mixture_components in $MIXTURE_COMPONENTS_LIST; do tomwalters@193: . $THIS_DIR/run_test_instance.sh & tomwalters@54: done tomwalters@54: done tomwalters@54: echo "Waiting..." tomwalters@54: wait tomwalters@54: