annotate experiments/scripts/cnbh-syllables/run_training_and_testing/test_features.sh @ 196:0caffb51753d

- AWS
author tomwalters
date Thu, 12 Aug 2010 12:25:36 +0000
parents 578ec2d32170
children bc36ab69fcf7
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@193 21 input_vector_size=$8
tomwalters@193 22 feature_code=$9
tomwalters@196 23 TRAIN_SPEAKERS=${10}
tomwalters@196 24 TEST_SPEAKERS=${11}
tomwalters@54 25
tomwalters@187 26 HMMCONFIG=hmm_configuration
tomwalters@165 27
tomwalters@193 28 THIS_DIR=`dirname $0`
tomwalters@165 29
tomwalters@194 30 if [ "$feature_code" == "MFCC_0_D_A" ]
tomwalters@54 31 then
tomwalters@193 32 cat <<"EOF" > $WORKING_DIRECTORY/$HMMCONFIG
tomwalters@54 33 # Coding parameters
tomwalters@54 34 SOURCEFORMAT= HTK
tomwalters@54 35 EOF
tomwalters@54 36 else
tomwalters@193 37 cat <<"EOF" > $WORKING_DIRECTORY/$HMMCONFIG
tomwalters@54 38 # Coding parameters
tomwalters@54 39 # The TARGETKIND and SOURCEKIND lines are to add deltas and delta-deltas to
tomwalters@54 40 # the AIM features
tomwalters@54 41 SOURCEFORMAT= HTK
tomwalters@54 42 SOURCEKIND= USER_E
tomwalters@54 43 TARGETKIND = USER_E_D_A
tomwalters@54 44 EOF
tomwalters@54 45 fi
tomwalters@54 46
tomwalters@187 47 for total_hmm_states in $HMM_STATES_LIST; do
tomwalters@187 48 for mixture_components in $MIXTURE_COMPONENTS_LIST; do
tomwalters@193 49 . $THIS_DIR/run_test_instance.sh &
tomwalters@54 50 done
tomwalters@54 51 done
tomwalters@54 52 echo "Waiting..."
tomwalters@54 53 wait
tomwalters@54 54