#!/bin/bash

SIG2FV=/home/korin/projects/newsyn/speech_tools/bin/sig2fv

if [ $# = 0 ]
then
   echo "Usage:  $0  coefdir wav/*.wav"
   exit 1
fi

COEFDIR=$1
shift


SIG2FV_OPTIONS="-shift 0.01 -otype est_binary -fbank_order 24 -shift 0.01 -factor 2.5 -preemph 0.97 -window_type hamming -melcep_order 12"


for file in $*; do
    echo $file;
    bname=`basename $file .wav`;
    $SIG2FV $SIG2FV_OPTIONS -coefs "melcep energy f0" $file -o $COEFDIR/${bname}.coef 
done