Skip to content

Commit 4037705

Browse files
authored
whisper : add missing speaker turn API function for whisper_state (ggml-org#1330)
1 parent c76c11e commit 4037705

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

whisper.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -5270,6 +5270,10 @@ int64_t whisper_full_get_segment_t1(struct whisper_context * ctx, int i_segment)
52705270
return ctx->state->result_all[i_segment].t1;
52715271
}
52725272

5273+
bool whisper_full_get_segment_speaker_turn_next_from_state(struct whisper_state * state, int i_segment) {
5274+
return state->result_all[i_segment].speaker_turn_next;
5275+
}
5276+
52735277
bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment) {
52745278
return ctx->state->result_all[i_segment].speaker_turn_next;
52755279
}

whisper.h

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

486486
// Get whether the next segment is predicted as a speaker turn
487487
WHISPER_API bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment);
488+
WHISPER_API bool whisper_full_get_segment_speaker_turn_next_from_state(struct whisper_state * state, int i_segment);
488489

489490
// Get the text of the specified segment
490491
WHISPER_API const char * whisper_full_get_segment_text (struct whisper_context * ctx, int i_segment);

0 commit comments

Comments
 (0)