next up previous
Next: Classification Up: Embedded voice recognition Previous: Voice recognition software brief

Training

#!/bin/bash

export PATH=$PATH:/usr/speech/

ITERS="0 1 2 3 4 5 6 7 8 9"

#Obtaining data; ten repetitions of each digit.
echo ``Obtaining data."
for d in $ITERS; do 
    for r in $ITERS; do
        echo $d$r
        ./raw2bf -be 0 -ee 0 
                ./mydata/DIG/$d/$d$r.raw > 
                ./mydata/DIG/$d/$d$r.bf 
done ;  done

#Obtaining a codebook of 32 codewords.
echo "Obtaining a codebook of 32 codewords."
cat ./mydata/DIG/?/??.bf | 
./bf2str -C 32 > DIG.cdbk

#Vectorial quantification.
echo "Vectorial quantification."
for d in $ITERS; do 
    for r in $ITERS; do
        echo $d$r 
        ./bf2str -c DIG.cdbk -l $d 
                 ./mydata/DIG/$d/$d$r.bf > 
                 ./mydata/DIG/$d/$d$r.str;
done ; 
    done 
        

#Training
echo "Training."
cat ./mydata/DIG/?/??.str | 
./strclass -n 20 > DIG.hmm


Josep Vidal Canet 2003-04-24