ggerganov commited on
Commit
9373d6b
·
unverified ·
1 Parent(s): adde036

whisper : free whisper_mel instances (#2220)

Browse files
Files changed (1) hide show
  1. whisper.cpp +1 -0
whisper.cpp CHANGED
@@ -3781,6 +3781,7 @@ void whisper_free_params(struct whisper_full_params * params) {
3781
  int whisper_pcm_to_mel_with_state(struct whisper_context * /*ctx*/, struct whisper_state * state, const float * samples, int n_samples, int n_threads) {
3782
  const int64_t t_start_us = ggml_time_us();
3783
 
 
3784
  state->mel = state->mel_calc->calculate({samples, n_samples}, n_threads);
3785
 
3786
  state->t_mel_us += ggml_time_us() - t_start_us;
 
3781
  int whisper_pcm_to_mel_with_state(struct whisper_context * /*ctx*/, struct whisper_state * state, const float * samples, int n_samples, int n_threads) {
3782
  const int64_t t_start_us = ggml_time_us();
3783
 
3784
+ whisper_mel_free(state->mel);
3785
  state->mel = state->mel_calc->calculate({samples, n_samples}, n_threads);
3786
 
3787
  state->t_mel_us += ggml_time_us() - t_start_us;