]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
stream : fix a bug that inserted a lot of empty audio at the start
authorGeorgi Gerganov <redacted>
Sat, 14 Jan 2023 17:20:47 +0000 (19:20 +0200)
committerGeorgi Gerganov <redacted>
Sat, 14 Jan 2023 17:20:47 +0000 (19:20 +0200)
The quality was terrible due to this

examples/stream/stream.cpp

index c7aa87178f9ff48127b999609b581a8317916b80..9f0c16c669a722c4aecc71fcb8603d6c9f4ace82 100644 (file)
@@ -459,7 +459,7 @@ int main(int argc, char ** argv) {
     struct whisper_context * ctx = whisper_init_from_file(params.model.c_str());
 
     std::vector<float> pcmf32    (n_samples_30s, 0.0f);
-    std::vector<float> pcmf32_old(n_samples_30s, 0.0f);
+    std::vector<float> pcmf32_old;
     std::vector<float> pcmf32_new(n_samples_30s, 0.0f);
 
     std::vector<whisper_token> prompt_tokens;