Speech:Summer 2012 run decode.pl


 * Home
 * Information

run_decode.pl Perl Script
This script will run a decode on an experiment. It has been modified to allow a user to specify a different location for the Acoustic Model rather than using the one in the current experiment folder.

Takes two arguments  

Usage: ./run_decode.pl 0013 0012

Source Code

 * 1) !/usr/bin/perl

if( $#ARGV != 1 ) { print "Runs Sphinx 3 decoding job\n"; print "usage: run_decode.pl  \n"; exit -1; }

$TASK = $ARGV[0]; $TRAIN_INPUT = $ARGV[1]; $TRAIN_INPUT_DIR = "/mnt/main/Exp/$TRAIN_INPUT/";

$TRAIN = "/mnt/main/Exp/$TASK/";

$DECODE = "/usr/local/bin/sphinx3_decode"; $HMM = $TRAIN_INPUT_DIR. "model_parameters/$TRAIN_INPUT.cd_cont_1000"; $LM = $TRAIN. "LM/tmp.arpa"; $DICT = $TRAIN. "etc/$TASK.dic"; $FDICT = $TRAIN. "etc/$TASK.filler"; $CTL = $TRAIN. "etc/$TASK". "_train.fileids"; $CEPDIR = $TRAIN. "feat"; $CEPEXT = ".mfc";

system("$DECODE -hmm $HMM -lm $LM -dict $DICT -fdict $FDICT -ctl $CTL -cepdir $CEPDIR -cepext $CEPEXT &> ./decode.log");