- Timestamp:
- 05/20/08 12:57:22 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/Scripts/Audio_scripts/AudioSegmentation/AudioBook/Audio.pm
r2586 r2588 43 43 my (@max_sentences, $max_sentence_length_found, $max_sentence_length_linenumber, $min_sentence_length_linenumber); 44 44 #my $min_sentence_length_found = $max_sentence_length; 45 my $min_sentence_length_found ;45 my $min_sentence_length_found = 0; 46 46 my $up_increment = 1; 47 47 my $down_increment = -1; … … 91 91 $textContents->createMLFFile("downsampled","AudioBook/interim_files/words.mlf" ); 92 92 # forced alignment - creates aligned.out 93 print "Running HVite ...(if this seems to take too long, check interim_files/logs/HVite_log for a possible explanation\n"; 94 print "(like \"no tokens surviving\"... which means that text does not match audio)\n"; 93 95 $command = ("pwd && HVite -A -D -T 1 -l '*' -a -b SENT-END -m -C $htk_files/wav_config -H $htk_files/models/macros -H $htk_files/models/hmmdefs -m -t 250.0 150.0 1000.0 -I AudioBook/interim_files/words.mlf -i AudioBook/interim_files/aligned.out -S $htk_files/train.scp AudioBook/interim_files/dict $htk_files/models/tiedlist > AudioBook/interim_files/logs/HVite_log"); system($command) == 0 or confess "error: $command failed: $?"; 94 96 open (HVite_Log,"AudioBook/interim_files/logs/HVite_log") || confess "error: can't open AudioBook/interim_files/HVite_log: $?"; … … 178 180 $self->{"aligned_words"} = $aligned_words; 179 181 180 print "### segment::$filename ########################### ######################################\n";182 print "### segment::$filename ###########################\n"; 181 183 # copy to "interim_files"" directory for processing; also converts to 16 bits per sample (-w=16-bits) so it can be processed by HVite 182 184 $command = ("sox $filename -w AudioBook/interim_files/$filename_nopath"); print "$command\n"; system($command) == 0 or confess "fullrun $command failed: $?";