Merge pull request #655 from danpovey/ctm_fix

Fix to create_segments_from_ctm.pl to create proper ctm file. see PR 651
This commit is contained in:
Daniel Povey 2016-04-05 19:00:53 -06:00
Родитель 2fd63cb672 ad0ac83e33
Коммит de185e2f11
1 изменённых файлов: 17 добавлений и 16 удалений

Просмотреть файл

@ -270,6 +270,7 @@ sub ProcessWav {
$current_ctm, $current_align, $SO, $TO, $ACT) = @_;
my $wav_id = $current_ctm->[0]->[0];
my $channel_id = $current_ctm->[0]->[1];
defined($wav_id) || die "Error: empty wav section\n";
# First, we have to align the ctm file to the Levenshtein alignment.
@ -325,7 +326,7 @@ sub ProcessWav {
# Save the aligned CTM if needed
if(defined($ACT)){
for (my $i = 0; $i <= $#aligned_ctm; $i++) {
print $ACT "$aligned_ctm[$i][0] $aligned_ctm[$i][1] ";
print $ACT "$wav_id $channel_id $aligned_ctm[$i][0] $aligned_ctm[$i][1] ";
print $ACT "$aligned_ctm[$i][2] $aligned_ctm[$i][3]\n";
}
}