Spaces:
Running
Running
whisper : account speed_up flag for short audio (close #405)
Browse files- whisper.cpp +1 -1
whisper.cpp
CHANGED
|
@@ -3230,7 +3230,7 @@ int whisper_full(
|
|
| 3230 |
// if length of spectrogram is less than 1s (100 samples), then return
|
| 3231 |
// basically don't process anything that is less than 1s
|
| 3232 |
// see issue #39: https://github.com/ggerganov/whisper.cpp/issues/39
|
| 3233 |
-
if (seek_end <
|
| 3234 |
return 0;
|
| 3235 |
}
|
| 3236 |
|
|
|
|
| 3230 |
// if length of spectrogram is less than 1s (100 samples), then return
|
| 3231 |
// basically don't process anything that is less than 1s
|
| 3232 |
// see issue #39: https://github.com/ggerganov/whisper.cpp/issues/39
|
| 3233 |
+
if (seek_end < seek_start + (params.speed_up ? 50 : 100)) {
|
| 3234 |
return 0;
|
| 3235 |
}
|
| 3236 |
|