Skip to content

Commit

Permalink
Update subsegment_data_dir.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
vimalmanohar authored Jun 20, 2017
1 parent 20cf238 commit 4d8461b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion egs/wsj/s5/utils/data/subsegment_data_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@


segment_end_padding=0.0
cmd=run.pl
nj=1

. utils/parse_options.sh

Expand Down Expand Up @@ -171,7 +173,11 @@ if [ -f $srcdir/feats.scp ]; then

# Here, we computes the maximum 'end' frame allowed for each <new-utt-id>.
# This is equal to the number of frames in the feature archive for <old-utt-id>.
utils/data/get_utt2num_frames.sh --cmd "run.pl" --nj 1 $srcdir
if [ ! -f $srcdir/utt2num_frames ]; then
echo "$0: WARNING: Could not find $srcdir/utt2num_frames. It might take a long time to run get_utt2num_frames.sh."
echo "Increase the number of jobs or write this file while extracting features by passing --write-utt2num-frames true to steps/make_mfcc.sh etc."
fi
utils/data/get_utt2num_frames.sh --cmd "$cmd" --nj $nj $srcdir
awk '{print $1" "$2}' $subsegments | \
utils/apply_map.pl -f 2 $srcdir/utt2num_frames > \
$dir/utt2max_frames
Expand Down

0 comments on commit 4d8461b

Please sign in to comment.