We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 650cc4b commit cc2d6bfCopy full SHA for cc2d6bf
stable_whisper/non_whisper/alignment.py
@@ -875,13 +875,14 @@ def _skip_nonspeech(
875
return audio_segment
876
877
segment_samples = audio_segment.size(-1)
878
+ segment_duration = segment_samples / self.sample_rate
879
880
max_time_offset = self._time_offset + self.options.post.min_word_dur
881
min_time_offset = self._time_offset - self.options.post.min_word_dur
882
883
if (
884
(segment_nonspeech_timings[0][0] < max_time_offset) and
- (segment_nonspeech_timings[1][0] > min_time_offset + segment_samples)
885
+ (segment_nonspeech_timings[1][0] > min_time_offset + segment_duration)
886
):
887
# entire audio segment is within first nonspeech section
888
self._seek_sample += segment_samples
0 commit comments