mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-22 02:09:11 +02:00
whisper : add missing speaker turn API function for whisper_state (#1330)
This commit is contained in:
parent
c76c11e59c
commit
4037705531
@ -5270,6 +5270,10 @@ int64_t whisper_full_get_segment_t1(struct whisper_context * ctx, int i_segment)
|
|||||||
return ctx->state->result_all[i_segment].t1;
|
return ctx->state->result_all[i_segment].t1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool whisper_full_get_segment_speaker_turn_next_from_state(struct whisper_state * state, int i_segment) {
|
||||||
|
return state->result_all[i_segment].speaker_turn_next;
|
||||||
|
}
|
||||||
|
|
||||||
bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment) {
|
bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment) {
|
||||||
return ctx->state->result_all[i_segment].speaker_turn_next;
|
return ctx->state->result_all[i_segment].speaker_turn_next;
|
||||||
}
|
}
|
||||||
|
@ -485,6 +485,7 @@ extern "C" {
|
|||||||
|
|
||||||
// Get whether the next segment is predicted as a speaker turn
|
// Get whether the next segment is predicted as a speaker turn
|
||||||
WHISPER_API bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment);
|
WHISPER_API bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment);
|
||||||
|
WHISPER_API bool whisper_full_get_segment_speaker_turn_next_from_state(struct whisper_state * state, int i_segment);
|
||||||
|
|
||||||
// Get the text of the specified segment
|
// Get the text of the specified segment
|
||||||
WHISPER_API const char * whisper_full_get_segment_text (struct whisper_context * ctx, int i_segment);
|
WHISPER_API const char * whisper_full_get_segment_text (struct whisper_context * ctx, int i_segment);
|
||||||
|
Loading…
Reference in New Issue
Block a user