stream : fix a bug that inserted a lot of empty audio at the start

The quality was terrible due to this
This commit is contained in:
Georgi Gerganov 2023-01-14 19:20:47 +02:00
parent 4ef3398e8f
commit a6dbd9188b
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View 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;