Speech:Gen errors.pl

Summary
Title: gen_errors.pl

Author: unknown

Location: mnt/main/scripts/user/gen_errors.pl

Usage:

Description

 * This script is used when training the acoustic model for an experiment.
 * It gives the output of how many errors were encountered and fills the html file with how many errors were found in each step.

Code

 * 1) !/usr/bin/perl

if ($#ARGV < 0) { print "Usage XYZ.pl \n"; exit -1; }

for($i=0; $i<=$#ARGV; $i++) { $expID = $ARGV[$i]; $html = "/mnt/main/Exp/$expID/$expID.html";

open(MYINPUTFILE, "$html");

$numErrors = 0; $readErrors = 0;

while() { $line = $_; if(index($line, "MODULE: 00") != -1) { $readErrors = 1; $numErrors = 0; }	if($readErrors == 1) { if(index($line, "This step had") != -1) { #print "Found error!\n"; $end = index($line, "ERROR"); $start = index($line, "This step had "); $line = substr($line, $start + 14, $end - $start - 15); $numErrors += $line; }	} } print "SphinxTrain encountered $numErrors errors when training acoustic model $expID\n"; }