From: Sandro Hanea Date: Thu, 9 Jan 2025 14:21:07 +0000 (+0100) Subject: whisper : add whisper_full_get_segment_no_speech_prob_from_state (#2716) X-Git-Tag: upstream/1.7.4+33~30 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2ab2eb5110018a1efd2744b7d4465209cf243e4c;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : add whisper_full_get_segment_no_speech_prob_from_state (#2716) --- diff --git a/include/whisper.h b/include/whisper.h index 03ce110d..1e137503 100644 --- a/include/whisper.h +++ b/include/whisper.h @@ -667,6 +667,7 @@ extern "C" { // Get the no_speech probability for the specified segment WHISPER_API float whisper_full_get_segment_no_speech_prob (struct whisper_context * ctx, int i_segment); + WHISPER_API float whisper_full_get_segment_no_speech_prob_from_state(struct whisper_state * state, int i_segment); #ifdef __cplusplus } #endif diff --git a/src/whisper.cpp b/src/whisper.cpp index 5a9f3df8..f90d3c1a 100644 --- a/src/whisper.cpp +++ b/src/whisper.cpp @@ -6464,6 +6464,10 @@ float whisper_full_get_segment_no_speech_prob(struct whisper_context * ctx, int return ctx->state->result_all[i_segment].no_speech_prob; } +float whisper_full_get_segment_no_speech_prob_from_state(struct whisper_state * state, int i_segment) { + return state->result_all[i_segment].no_speech_prob; +} + // ================================================================================================= //