From 687db319e0ba10f47239415dd74e8bfbd480d433 Mon Sep 17 00:00:00 2001 From: KH Date: Tue, 18 Jul 2023 23:03:01 +0900 Subject: [PATCH] Remove duplicate code (#359) --- faster_whisper/transcribe.py | 2 -- 1 file changed, 2 deletions(-) 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.