annotate trunk/experiments/scripts/cnbh-syllables/run_training_and_testing/test_features.sh @ 706:f8e90b5d85fd tip

Delete CARFAC code from this repository. It has been moved to https://github.com/google/carfac Please email me with your github username to get access. I've also created a new mailing list to discuss CARFAC development: https://groups.google.com/forum/#!forum/carfac-dev
author ronw@google.com
date Thu, 18 Jul 2013 20:56:51 +0000
parents 786166d87205
children
rev   line source
tomwalters@335 1 #!/bin/bash
tomwalters@335 2 #
tomwalters@335 3 # Train and test an HTK monophone model using AIM or MFCC
tomwalters@335 4 # features and the CNBH syllable databse
tomwalters@335 5 #
tomwalters@335 6 # Copyright 2009-2010 University of Cambridge
tomwalters@335 7 # Author: Thomas Walters <tom@acousticscale.org>
tomwalters@382 8 #
tomwalters@335 9 # Run multiple HMMs
tomwalters@335 10
tomwalters@335 11 set -e
tomwalters@335 12 set -u
tomwalters@335 13
tomwalters@335 14 WORKING_DIRECTORY=$1
tomwalters@335 15 FEATURE_SOURCE=$2
tomwalters@335 16 FEATURE_SUFFIX=$3
tomwalters@335 17 HMM_STATES_LIST=$4
tomwalters@335 18 MIXTURE_COMPONENTS_LIST=$5
tomwalters@335 19 TRAINING_ITERATIONS_LIST=$6
tomwalters@335 20 TESTING_ITERATIONS_LIST=$7
tomwalters@363 21 input_vector_size=$8
tomwalters@363 22 feature_code=$9
tomwalters@376 23 TRAIN_SCRIPT=${10}
tomwalters@376 24 TEST_SCRIPT=${11}
tomwalters@372 25 TRAIN_MLF=${12}
tomwalters@376 26 TEST_MLF=${13}
tomwalters@385 27 SPOKE_PATTERN_FILE=${14}
tomwalters@335 28
tomwalters@357 29 HMMCONFIG=hmm_configuration
tomwalters@335 30
tomwalters@363 31 THIS_DIR=`dirname $0`
tomwalters@335 32
tomwalters@364 33 if [ "$feature_code" == "MFCC_0_D_A" ]
tomwalters@335 34 then
tomwalters@363 35 cat <<"EOF" > $WORKING_DIRECTORY/$HMMCONFIG
tomwalters@335 36 # Coding parameters
tomwalters@335 37 SOURCEFORMAT= HTK
tomwalters@335 38 EOF
tomwalters@335 39 else
tomwalters@363 40 cat <<"EOF" > $WORKING_DIRECTORY/$HMMCONFIG
tomwalters@335 41 # Coding parameters
tomwalters@335 42 # The TARGETKIND and SOURCEKIND lines are to add deltas and delta-deltas to
tomwalters@335 43 # the AIM features
tomwalters@335 44 SOURCEFORMAT= HTK
tomwalters@335 45 SOURCEKIND= USER_E
tomwalters@335 46 TARGETKIND = USER_E_D_A
tomwalters@335 47 EOF
tomwalters@335 48 fi
tomwalters@335 49
tomwalters@357 50 for total_hmm_states in $HMM_STATES_LIST; do
tomwalters@357 51 for mixture_components in $MIXTURE_COMPONENTS_LIST; do
tomwalters@413 52 . $THIS_DIR/run_test_instance.sh &
tomwalters@413 53 #. $THIS_DIR/run_test_instance.sh
tomwalters@335 54 done
tomwalters@335 55 done
tomwalters@335 56 echo "Waiting..."
tomwalters@335 57 wait
tomwalters@335 58