whisper : add whisper_full_get_segment_no_speech_prob_from_state (#2716)

This commit is contained in:
Sandro Hanea 2025-01-09 15:21:07 +01:00 committed by GitHub
parent b82d305282
commit 2ab2eb5110
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -667,6 +667,7 @@ extern "C" {
// Get the no_speech probability for the specified segment // 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 (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 #ifdef __cplusplus
} }
#endif #endif

View 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; 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;
}
// ================================================================================================= // =================================================================================================
// //