voxforge.org
VoxForge Dev

root/Trunk/Scripts/AcousticModel_scripts/HTK/manual_testing/fixTestPrompts.pl

Revision 2270, 1.4 kB (checked in by kmaclean, 1 year ago)

Flac audio processing updates & GPL v3 updates

Line 
1 #!/usr/bin/perl
2 ####################################################################
3 ###
4 ### script name : fixtestprompts.pl
5 ### version: 0.1
6 ### created by: Ken MacLean
7 ### mail: contact@voxforge.org
8 ### Date: 2006.09.5
9 ### Command: perl ./fixtestprompts.pl
10 ###   
11 ### Copyright (C) 2006 Ken MacLean
12 ###
13 ### This program is free software; you can redistribute it and/or
14 ### modify it under the terms of the GNU General Public License
15 ### as published by the Free Software Foundation; either version 3
16 ### of the License, or (at your option) any later version.
17 ###
18 ### This program is distributed in the hope that it will be useful,
19 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 ### GNU General Public License for more details.
22 ###                                                             
23 ####################################################################
24
25 use strict;
26 my ($line, $label, $filein, $fileout, %seen);
27 if (@ARGV != 2) {
28   print "usage: $0 filein fileout\n\n";
29   exit (0);
30 }
31 # read in command line arguments
32 ($filein, $fileout) = @ARGV;
33
34 open (FILEIN,"$filein") || die ("Unable to open $filein for reading");
35 open (FILEOUT,">$fileout") || die ("Unable to open $fileout for writing");
36
37 while ($line = <FILEIN>) {
38   chomp ($line);
39   $line =~ s/\.//;
40   print (FILEOUT "test$line\n");
41 }
42 close(FILEOUT);
Note: See TracBrowser for help on using the browser.