Skip to content

Commit 2ab2eb5

Browse files
authored
whisper : add whisper_full_get_segment_no_speech_prob_from_state (#2716)
1 parent b82d305 commit 2ab2eb5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/whisper.h

+1
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,7 @@ extern "C" {
667667

668668
// Get the no_speech probability for the specified segment
669669
WHISPER_API float whisper_full_get_segment_no_speech_prob (struct whisper_context * ctx, int i_segment);
670+
WHISPER_API float whisper_full_get_segment_no_speech_prob_from_state(struct whisper_state * state, int i_segment);
670671
#ifdef __cplusplus
671672
}
672673
#endif

src/whisper.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -6464,6 +6464,10 @@ float whisper_full_get_segment_no_speech_prob(struct whisper_context * ctx, int
64646464
return ctx->state->result_all[i_segment].no_speech_prob;
64656465
}
64666466

6467+
float whisper_full_get_segment_no_speech_prob_from_state(struct whisper_state * state, int i_segment) {
6468+
return state->result_all[i_segment].no_speech_prob;
6469+
}
6470+
64676471
// =================================================================================================
64686472

64696473
//

0 commit comments

Comments
 (0)