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