From a0f7c4a43dde89be8650fd123ccda0d481329289 Mon Sep 17 00:00:00 2001 From: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:48:21 +0000 Subject: [PATCH] [Whisper] Fix doctest in timestamp logits processor (#27795) --- src/transformers/generation/logits_process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/generation/logits_process.py b/src/transformers/generation/logits_process.py index 6c7b84f6ae670..d5f65161ecd76 100644 --- a/src/transformers/generation/logits_process.py +++ b/src/transformers/generation/logits_process.py @@ -1503,7 +1503,7 @@ class WhisperTimeStampLogitsProcessor(LogitsProcessor): >>> #Displaying timestamps >>> generated_ids = model.generate(inputs=input_features, return_timestamps=True) - >>> transcription = processor.batch_decode(generated_ids, skip_special_tokens=False)[0] + >>> transcription = processor.batch_decode(generated_ids, decode_with_timestamps=True)[0] >>> print("Transcription:", transcription) Transcription: <|startoftranscript|><|0.00|> He has grave doubts whether Sir Frederick Layton's work is really Greek after all, and can<|6.44|><|6.44|> discover in it but little of rocky Ithaca.<|9.44|><|endoftext|>