From 4d8461bfdec0910aa9147ae3a3d69b2670179ed6 Mon Sep 17 00:00:00 2001 From: Vimal Manohar Date: Tue, 20 Jun 2017 14:06:25 -0400 Subject: [PATCH] Update subsegment_data_dir.sh --- egs/wsj/s5/utils/data/subsegment_data_dir.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/egs/wsj/s5/utils/data/subsegment_data_dir.sh b/egs/wsj/s5/utils/data/subsegment_data_dir.sh index 78f703caa1f..b05768e6959 100755 --- a/egs/wsj/s5/utils/data/subsegment_data_dir.sh +++ b/egs/wsj/s5/utils/data/subsegment_data_dir.sh @@ -21,6 +21,8 @@ segment_end_padding=0.0 +cmd=run.pl +nj=1 . utils/parse_options.sh @@ -171,7 +173,11 @@ if [ -f $srcdir/feats.scp ]; then # Here, we computes the maximum 'end' frame allowed for each . # This is equal to the number of frames in the feature archive for . - 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