Speech:GenFeats.pl

Summary
Title: genFeats.pl

Author: David Meehan

Updated (v6) by Jonathan Shallow & Matthew Heyner Sp16

Location: /mnt/main/scripts/user/ /mnt/main/scripts/user/History/genFeats/6 /mnt/main/scripts/user/History/genFeats/cur

Usages: genFeats.pl -t genFeats.pl -d

Description
The flag for this script allows the user to either point to -d _decode.fileids or -t _train.fileids.

This script calls scripts_pl/makeFeats.pl and removes the symbolic link to the audio files, and creates a new link pointing to the actual audio directory. Run this script after makeTrain.pl to fully prepare an experiment up to acoustic model training.

Code
=begin comment genFeats.pl (generateFeats.pl) Semester: Spring 2016 Start Date: 4/10/16 Last Modified: 4/21/16 Recent changes: - 4/12/2016 - Added the $flag variable to allow for feats to be generated on either $exp_decode.fileids or $exp_train.fileids - 4/21/2016 - Jon Shallow commented out the old method of generating feats in place of a far more dynamic method of soft linking to a central folder of pre-generated feats file. =cut
 * 1) ! /usr/bin/perl

use Cwd; use File::Basename;

if ($#ARGV != 0) { print "Usage: genFeats.pl -d\n"; print "Example#1: genFeats.pl -d\n"; print "Information: Run from the main experiment directory you wish to make feats for.\n"; print "Flag -d: Points to _decode.fileids\n"; print "Flag -t: Points to _train.fileids\n"; exit -1; }

$flag = $ARGV[0];

$path = getcwd; $exp = basename($path);

print "$flag\n";

$test_type = ''; if($flag eq '-d'){$test_type = '_decode';} elsif($flag eq '-t'){$test_type = '_train';}

print "$exp". "$test_type.fileids\n";

$cmd = "perl /mnt/main/scripts/user/linkTransAudio.pl $exp$test_type.fileids mfc /mnt/main/corpus/switchboard/full/train/audio/mfc/"; system($cmd);
 * 1) $cmd = "scripts_pl/make_feats.pl -ctl etc/$exp" . "$test_type.fileids";

print "\nComplete!\nRun \"nohup scripts_pl/RunAll.pl &\" to begin training.\n";