Skip to content

Commit 4c087a2

Browse files
KimJeongSunBar-BY
authored andcommitted
[scripts] Improve how combine_ali_dirs.sh gets job-specific filenames (kaldi-asr#3720)
1 parent 156f802 commit 4c087a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

egs/wsj/s5/steps/combine_ali_dirs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ do_combine() {
166166
# Merge (presumed already sorted) scp's into a single script.
167167
sort -m $temp_dir/$ark.*.scp > $temp_dir/$ark.scp || exit 1
168168

169+
inputs=$(for n in `seq $nj`; do echo $temp_dir/$ark.$n.scp; done)
170+
utils/split_scp.pl --utt2spk=$data/utt2spk $temp_dir/$ark.scp $inputs
171+
169172
echo "$0: Splitting combined $entities into $nj archives on speaker boundary."
170173
$cmd JOB=1:$nj $dest/log/chop_combined_$entities.JOB.log \
171174
$copy_program \
172-
"scp:utils/split_scp.pl --utt2spk=$data/utt2spk --one-based -j $nj JOB $temp_dir/$ark.scp |" \
175+
"scp:$temp_dir/$ark.JOB.scp" \
173176
"ark:| gzip -c > $dest/$ark.JOB.gz" || exit 1
174177

175178
# Get some interesting stats, and signal an error if error threshold exceeded.

0 commit comments

Comments
 (0)