Skip to content

Commit

Permalink
[scripts] Fix to steps/segmentation/internal/sad_to_segments.py (kald…
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Peng authored and danpovey committed Jun 1, 2018
1 parent 6f5f778 commit eef2a09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions egs/wsj/s5/steps/segmentation/internal/sad_to_segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ def pad_speech_segments(self, segment_padding, max_duration=float("inf")):
"""Pads segments by duration 'segment_padding' on either sides, but
ensures that the segments don't go beyond the neighboring segments
or the duration of the utterance 'max_duration'."""
if max_duration == None:
max_duration = float("inf")
for i, segment in enumerate(self.segments):
assert segment[2] == 2, segment
segment[0] -= segment_padding # try adding padding on the left side
Expand Down

0 comments on commit eef2a09

Please sign in to comment.