From 2b5ae8cafad72f325b7fb89a7cb62856f78891dd Mon Sep 17 00:00:00 2001 From: carlos Date: Mon, 9 Feb 2026 09:55:29 +0000 Subject: [PATCH 1/3] [BugFix] Type hint fix in decode_batch List[str] not str: --- whisperx/asr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisperx/asr.py b/whisperx/asr.py index c35900cf9..eb844ef49 100644 --- a/whisperx/asr.py +++ b/whisperx/asr.py @@ -76,7 +76,7 @@ def generate_segment_batched( tokens_batch = [x.sequences_ids[0] for x in result] - def decode_batch(tokens: List[List[int]]) -> str: + def decode_batch(tokens: List[List[int]]) -> List[str]: res = [] for tk in tokens: res.append([token for token in tk if token < tokenizer.eot]) From 570b08b7be3d064d470b228b2d56f11bb7f9d7c8 Mon Sep 17 00:00:00 2001 From: "p.sacco" Date: Tue, 10 Feb 2026 10:44:58 +0000 Subject: [PATCH 2/3] fix: add no_repeat_ngram_size and repetition_penalty options to WhisperModel --- whisperx/asr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/whisperx/asr.py b/whisperx/asr.py index c35900cf9..1ed22e52d 100644 --- a/whisperx/asr.py +++ b/whisperx/asr.py @@ -72,6 +72,8 @@ def generate_segment_batched( max_length=self.max_length, suppress_blank=options.suppress_blank, suppress_tokens=options.suppress_tokens, + no_repeat_ngram_size=options.no_repeat_ngram_size, + repetition_penalty=options.repetition_penalty, ) tokens_batch = [x.sequences_ids[0] for x in result] From cc6f627a39e69f118047ff492cd1eeca3ca92172 Mon Sep 17 00:00:00 2001 From: carlos Date: Tue, 10 Feb 2026 14:38:13 +0000 Subject: [PATCH 3/3] [BugFix] The variable I removed was not being used anyhwere. --- whisperx/asr.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/whisperx/asr.py b/whisperx/asr.py index c35900cf9..0bee277cc 100644 --- a/whisperx/asr.py +++ b/whisperx/asr.py @@ -58,11 +58,7 @@ def generate_segment_batched( ) encoder_output = self.encode(features) - - max_initial_timestamp_index = int( - round(options.max_initial_timestamp / self.time_precision) - ) - + result = self.model.generate( encoder_output, [prompt] * batch_size,