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@54: # 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@82: input_vector_size=$8 tomwalters@82: feature_code=$9 tomwalters@54: tomwalters@54: TRAIN_SPEAKERS=train_speakers tomwalters@54: TEST_SPEAKERS=test_speakers tomwalters@54: tomwalters@76: HMMCONFIG=hmm_configuration tomwalters@54: tomwalters@82: THIS_DIR=`dirname $0` tomwalters@54: tomwalters@83: if [ "$feature_code" == "MFCC_0_D_A" ] tomwalters@54: then tomwalters@82: cat <<"EOF" > $WORKING_DIRECTORY/$HMMCONFIG tomwalters@54: # Coding parameters tomwalters@54: SOURCEFORMAT= HTK tomwalters@54: EOF tomwalters@54: else tomwalters@82: 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@76: for total_hmm_states in $HMM_STATES_LIST; do tomwalters@76: for mixture_components in $MIXTURE_COMPONENTS_LIST; do tomwalters@82: . $THIS_DIR/run_test_instance.sh & tomwalters@54: done tomwalters@54: done tomwalters@54: echo "Waiting..." tomwalters@54: wait tomwalters@54: