#!/bin/bash

## Gernate mfccs for forced alignment and nist wav files if required.

if [ "$#" -lt 2 ] ; then
 echo "usage: $0 root_dir wav/*.wav"
fi

rootdir=$1
shift

mkdir -p wav_nist mfcc

for file in $* ; do
    
    fileroot=`basename $file .wav`
    nistwav=wav_nist/$fileroot.wav2
    mfcc=mfcc/$fileroot.mfcc

    $ESTDIR/bin/ch_wave -otype nist -o $nistwav $file
    HCopy -T 1 -C $rootdir/resources/CONFIG_for_coding $nistwav $mfcc

done
