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@335: # 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@335: FEATURE_SIZE=$8 tomwalters@335: FEATURE_TYPE=$9 tomwalters@335: tomwalters@335: tomwalters@335: TRAIN_SPEAKERS=train_speakers tomwalters@335: TEST_SPEAKERS=test_speakers tomwalters@335: tomwalters@335: # These are not tomwalters@335: SYLLIST_COMPLETE=syllist tomwalters@335: GRAM=gram tomwalters@335: DICT=dict tomwalters@335: WDNET=wdnet tomwalters@335: TRAIN_MLF=train.mlf tomwalters@335: TEST_MLF=test.mlf tomwalters@335: HMMCONFIG=hmmconfig tomwalters@335: tomwalters@335: tomwalters@356: if [ "$FEATURE_TYPE" == "MFCC_0_D_A"] tomwalters@335: then tomwalters@335: cat <<"EOF" > $WORK/$HMMCONFIG tomwalters@335: # Coding parameters tomwalters@335: SOURCEFORMAT= HTK tomwalters@335: EOF tomwalters@335: else tomwalters@335: cat <<"EOF" > $WORK/$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@335: for total_hmm_states in 3 4 5 6 7 8; do tomwalters@335: for mixture_components in 1 2 3 4 5 6 7; do tomwalters@335: . run_test_instance.sh & tomwalters@335: done tomwalters@335: done tomwalters@335: echo "Waiting..." tomwalters@335: wait tomwalters@335: