Remove duplicate code (#359)

This commit is contained in:
KH
2023-07-18 16:03:01 +02:00
committed by GitHub
parent 171d90dd1f
commit 687db319e0
-2
View File
@@ -722,8 +722,6 @@ class WhisperModel:
# hack: truncate long words at sentence boundaries.
# a better segmentation algorithm based on VAD should be able to replace this.
if len(word_durations) > 0:
median_duration = np.median(word_durations)
max_duration = median_duration * 2
sentence_end_marks = ".。!?"
# ensure words at sentence boundaries
# are not longer than twice the median word duration.