#! /bin/sh
#set -x

case $# in
0)
        echo Please give sa1 or sa2 as an argument to this script. 
        exit 1 ;;
esac


file=$1

xwaves -s &
sleep 1 
send_xwaves attach function xlabel 

rm -f $file.phn.w $file.wrd.w

cnvlab -s 16000 $file.phn $file.phn.w	
cnvlab -s 16000 $file.wrd $file.wrd.w	

send_xwaves make name timit file $file.wav
send_xwaves send make name timit file $file.phn.w
send_xwaves send make name timit file $file.wrd.w




