diff --git a/lhotse/cut/set.py b/lhotse/cut/set.py index 00d769014..0613ff2e8 100644 --- a/lhotse/cut/set.py +++ b/lhotse/cut/set.py @@ -2923,6 +2923,8 @@ def compute_supervisions_frame_mask( if ali.end < cut.duration else num_frames ) + if et <= 0: + continue mask[st:et] = 1.0 else: st = round(supervision.start / frame_shift) if supervision.start > 0 else 0 @@ -2931,6 +2933,8 @@ def compute_supervisions_frame_mask( if supervision.end < cut.duration else num_frames ) + if et <= 0: + continue mask[st:et] = 1.0 return mask