Skip to content

Commit

Permalink
whisper : add whisper_full_get_segment_no_speech_prob_from_state (#2716)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrohanea authored Jan 9, 2025
1 parent b82d305 commit 2ab2eb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/whisper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

// =================================================================================================

//
Expand Down

0 comments on commit 2ab2eb5

Please sign in to comment.