]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : free whisper_mel instances (#2220)
authorGeorgi Gerganov <redacted>
Mon, 10 Jun 2024 07:59:36 +0000 (10:59 +0300)
committerGeorgi Gerganov <redacted>
Mon, 10 Jun 2024 08:00:15 +0000 (11:00 +0300)
whisper.cpp

index e8a1320898bb7a4ac0928afb67d4b06552871180..58b4a65e72543c28b4d0763093c5a3bddc1f194d 100644 (file)
@@ -3781,6 +3781,7 @@ void whisper_free_params(struct whisper_full_params * params) {
 int whisper_pcm_to_mel_with_state(struct whisper_context * /*ctx*/, struct whisper_state * state, const float * samples, int n_samples, int n_threads) {
     const int64_t t_start_us = ggml_time_us();
 
+    whisper_mel_free(state->mel);
     state->mel = state->mel_calc->calculate({samples, n_samples}, n_threads);
 
     state->t_mel_us += ggml_time_us() - t_start_us;