]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : add whisper_full_get_segment_no_speech_prob_from_state (#2716)
authorSandro Hanea <redacted>
Thu, 9 Jan 2025 14:21:07 +0000 (15:21 +0100)
committerGitHub <redacted>
Thu, 9 Jan 2025 14:21:07 +0000 (16:21 +0200)
include/whisper.h
src/whisper.cpp

index 03ce110da70664322cbb64bf799498db1f648d14..1e1375033adbd3306ba87687084d661e48abd524 100644 (file)
@@ -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
index 5a9f3df8ede8d7f97eb88c7f6761ea81953e149a..f90d3c1ae8776edb7b896270c7b086fa0a6a1bb6 100644 (file)
@@ -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;
+}
+
 // =================================================================================================
 
 //