From 00ea21668b7db98e0530324c0bc1bff53df6995c Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 15 Jan 2023 12:41:42 +0200 Subject: [PATCH] whisper : account speed_up flag for short audio (close #405) --- whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisper.cpp b/whisper.cpp index c400856..05bf58e 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -3230,7 +3230,7 @@ int whisper_full( // if length of spectrogram is less than 1s (100 samples), then return // basically don't process anything that is less than 1s // see issue #39: https://github.com/ggerganov/whisper.cpp/issues/39 - if (seek_end < 100 + seek_start) { + if (seek_end < seek_start + (params.speed_up ? 50 : 100)) { return 0; }