зеркало из https://github.com/mozilla/kaldi.git
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:
Коммит
de185e2f11
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче