whisper : account speed_up flag for short audio (close #405)

This commit is contained in:
Georgi Gerganov 2023-01-15 12:41:42 +02:00
parent 0b85e8c401
commit 00ea21668b
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -3230,7 +3230,7 @@ int whisper_full(
// if length of spectrogram is less than 1s (100 samples), then return // if length of spectrogram is less than 1s (100 samples), then return
// basically don't process anything that is less than 1s // basically don't process anything that is less than 1s
// see issue #39: https://github.com/ggerganov/whisper.cpp/issues/39 // 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; return 0;
} }