Skip to content

Commit

Permalink
whisper : add missing speaker turn API function for whisper_state (gg…
Browse files Browse the repository at this point in the history
  • Loading branch information
didzis authored and vonstring committed Nov 7, 2023
1 parent e01b00f commit 0433824
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions whisper.cpp
Expand Up @@ -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;
}

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) {
return ctx->state->result_all[i_segment].speaker_turn_next;
}
Expand Down
1 change: 1 addition & 0 deletions whisper.h
Expand Up @@ -485,6 +485,7 @@ extern "C" {

// 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_from_state(struct whisper_state * state, int i_segment);

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

0 comments on commit 0433824

Please sign in to comment.