voxforge.org
VoxForge Dev
Show
Ignore:
Timestamp:
06/04/08 11:49:09 (7 months ago)
Author:
kmaclean
Message:

AudioSegmentation scripts - snapshot

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/Scripts/Audio_scripts/AudioSegmentation/AudioBook/Text.pm

    r2595 r2604  
    488488        my @uniq = grep !$seen{$_}++, @words2; 
    489489        open(WLIST, ">$WLISTFile") or confess ("cannot write to wlist"); 
     490        my $previousword; 
    490491        foreach my $word (@uniq) { 
    491                         print WLIST "$word\n"; 
     492                if ($word =~ /^\s*$/) { # looking for zero or more spaces 
     493                        print "error:createWLISTFile - blank word after $previousword\n";                
     494                }        
     495                print WLIST "$word\n"; 
     496                $previousword = $word; 
    492497        } 
    493498        close(WLIST); 
     
    510515        print MLF "#!MLF!#\n"; #  
    511516        print MLF "\"AudioBook/interim_files/$wavfilename.lab\"\n"; 
     517        my $previousword;        
    512518        foreach my $word (@$words) { 
     519                if ($word =~ /^\s*$/) { # looking for zero or more spaces 
     520                        print "error:createMLFFile - blank word after $previousword\n";          
     521                }                        
    513522                print MLF "$word\n"; 
     523                $previousword = $word;                   
    514524        } 
    515525        print MLF "\.\n";