diff --git a/faster_whisper/transcribe.py b/faster_whisper/transcribe.py index 538bb93f..e4cf9043 100644 --- a/faster_whisper/transcribe.py +++ b/faster_whisper/transcribe.py @@ -722,8 +722,6 @@ def add_word_timestamps( # 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.