]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : account speed_up flag for short audio (close #405)
authorGeorgi Gerganov <redacted>
Sun, 15 Jan 2023 10:41:42 +0000 (12:41 +0200)
committerGeorgi Gerganov <redacted>
Sun, 15 Jan 2023 10:42:15 +0000 (12:42 +0200)
whisper.cpp

index c40085675baaa7b6ff65852d14402c2c2be7ea8a..05bf58e16e3f77d0031aa0611e21aec0f5721e06 100644 (file)
@@ -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;
     }