From: Georgi Gerganov Date: Sat, 14 Jan 2023 17:20:47 +0000 (+0200) Subject: stream : fix a bug that inserted a lot of empty audio at the start X-Git-Tag: upstream/1.7.4~1622 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a6dbd9188b13378dc36e2c669b9a22e17b4201d1;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp stream : fix a bug that inserted a lot of empty audio at the start The quality was terrible due to this --- diff --git a/examples/stream/stream.cpp b/examples/stream/stream.cpp index c7aa8717..9f0c16c6 100644 --- a/examples/stream/stream.cpp +++ b/examples/stream/stream.cpp @@ -459,7 +459,7 @@ int main(int argc, char ** argv) { struct whisper_context * ctx = whisper_init_from_file(params.model.c_str()); std::vector pcmf32 (n_samples_30s, 0.0f); - std::vector pcmf32_old(n_samples_30s, 0.0f); + std::vector pcmf32_old; std::vector pcmf32_new(n_samples_30s, 0.0f); std::vector prompt_tokens;