From: Georgi Gerganov Date: Sun, 15 Jan 2023 10:41:42 +0000 (+0200) Subject: whisper : account speed_up flag for short audio (close #405) X-Git-Tag: upstream/1.7.4~1618 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=00ea21668b7db98e0530324c0bc1bff53df6995c;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : account speed_up flag for short audio (close #405) --- diff --git a/whisper.cpp b/whisper.cpp index c4008567..05bf58e1 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; }