#!/bin/sh
S2BATCH=/usr/bin/pocketsphinx_continuous
HMM=/usr/share/pocketsphinx/model/hmm/wsj1
TASK=/usr/share/pocketsphinx/model/lm/turtle
CTLFILE=/usr/share/pocketsphinx/model/lm/turtle/turtle.ctl
DATADIR=/usr/share/pocketsphinx/model/lm/turtle

echo " "
echo "pocketsphinx_test"
echo "Run CMU PocketSphinx in Batch mode to decode an example utterance."
echo " "

$S2BATCH -adcin yes \
    -ctl ${CTLFILE} \
    -cepdir ${DATADIR} \
    -cepext .16k \
    -samprate 16000 \
    -agc none \
    -fwdflat no -bestpath no \
    -lm ${TASK}/turtle.lm \
    -dict ${TASK}/turtle.dic \
    -hmm ${HMM} \
    -mmap yes

echo ""
echo "TEST FINISHED"
echo "If you want to log the output to a file, add the flag"
echo "-logfn <logfilename> to this script and rerun"
