#!/bin/csh
###################################################################################
#
# Shell script to run CTK script make_harmonicity_data.ctk on the AURORA II
# Test Set A data to generate the voicing, f0, and autoc_mask from the
#  rate32d feature test set
#
# Requires environment variables:
#   CTK_AURORAROOT, CTKROOT, AURORAROOT  
#
# It assumes the test data is stored under AURORAROOT with the directory structure:
#   $AURORAROOT/speechdata/testa/clean1/FAK_1B.08 etc etc
#
# The output files will be created with paths like:
#   $CTKWORK/data/harmonicity/testa/clean1/FAK_1B.rate32_d
#
###################################################################################

## These should be set in your environment
#  CTK_AURORAROOT   --  Where you keep the CTK_AURORA scripts etc
#  CTKROOT   --  Where your CTK is installed
#  AURORAROOT -- Where AURORA II is installed

# Run through each noise type
foreach SETNO (1 2 3 4)
setenv SET $SETNO

# Run through each noise condition
foreach NOISE (clean$SET N$SET\_SNR0 N$SET\_SNR10 N$SET\_SNR20 N$SET\_SNR15 N$SET\_SNR5  N$SET\_SNR-5)

## Set the paths needed by the CTK script
setenv INDATA_PATH $AURORAROOT/speechdata/testa/$NOISE
setenv OUTDATA_PATH $CTK_AURORAROOT/data/harmonicity/testa/$NOISE

echo $INDATA_PATH
echo $OUTDATA_PATH

## Run the CTK script to make the features
$CTKROOT/bin/CTKScript make_harmonicity_data.ctk -S $CTK_AURORAROOT/flists/$SETNO.flist

end
end

