#!/bin/sh

rec=recVapE
mfccname=mfcp
mapping=sonority
#rec is a directory containing initial specification of stuff for
# a particular try at building a HMM.
Corpus=../metadata/*.fiat
Frags=''
Manual=../manual_db.fiat

date >>LOG
echo ARGS: $0 $* >>LOG

rm -rf tmpR

NP=4
{
for f in $Manual $Frags $Corpus
do
  echo python bin/make_mfcc_files_for_rec.py -lazy -F$mfccname $f
done
} | run_several.py $NP 3

bash bin/rec.sh $rec HTK$mfccname $mapping $Manual ||
	die.sh "rec.sh fails" || exit 1

bash bin/rec_e2.sh -shortR tmpR $rec HTK$mfccname $mapping $Frags $Corpus ||
	die.sh "rec_e2.sh fails. Exiting." || exit 1

bash bin/rec_e2.sh -Continue tmpE13 $rec HTK$mfccname $mapping $Frags $Corpus ||
	die.sh "rec_e2.sh fails. Exiting." || exit 1

bash bin/rec_all.sh $rec HTK$mfccname $mfccname $Corpus $Frags ||
	die.sh "rec_all.sh fails. Exiting." || exit 1

echo "DONE"
