File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -4411,19 +4411,9 @@ struct whisper_vad_model {
44114411};
44124412
44134413struct whisper_vad_state {
4414- // Hidden state for LSTM
4415- std::vector<float > h; // Hidden state dimension
4416- std::vector<float > c; // Cell state dimension
4417-
44184414 std::vector<ggml_backend_t > backends;
44194415
44204416 whisper_sched sched;
4421-
4422- // Reset state
4423- void reset () {
4424- h.clear ();
4425- c.clear ();
4426- }
44274417};
44284418
44294419struct whisper_vad_context {
@@ -4698,8 +4688,6 @@ struct whisper_vad_state * whisper_vad_init_state(whisper_vad_context * ctx) {
46984688 whisper_vad_free_state (state);
46994689 return nullptr ;
47004690 }
4701- state->h .resize (ctx->model .hparams .lstm_hidden_size );
4702- state->c .resize (ctx->model .hparams .lstm_hidden_size );
47034691
47044692 {
47054693 bool ok = whisper_sched_graph_init (state->sched , state->backends ,
@@ -6682,7 +6670,7 @@ int whisper_full_with_state(
66826670
66836671 result_all.clear ();
66846672
6685- float * filtered_samples = NULL ;
6673+ float * filtered_samples = nullptr ;
66866674 int filtered_n_samples = n_samples;
66876675 if (params.vad ) {
66886676 WHISPER_LOG_INFO (" %s: VAD is enabled, processing speach segments only\n " , __func__);
You can’t perform that action at this time.
0 commit comments