Skip to content

Commit 7a50987

Browse files
authored
[scripts] Bug-fix: ensure allowed lengths all written as int (#3919)
Ensure that allowed lengths are all written as `int` as intended. This is required by downstream scripts like steps/nnet3/chain/e2e/get_egs_e2e.sh.
1 parent 2c4f1da commit 7a50987

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

egs/wsj/s5/utils/data/get_allowed_durations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def get_trivial_allowed_durations(utt2dur, args):
180180
+ args.frame_length + args.frame_shift / 2) / 1000.0
181181
allowed_durations.append(d)
182182
durs_fp.write("{}\n".format(d))
183-
lengths_fp.write("{}\n".format(length))
183+
lengths_fp.write("{}\n".format(int(length)))
184184

185185
assert len(allowed_durations) > 0
186186
start_dur = allowed_durations[0]

0 commit comments

Comments
 (0)