MCPcopy Create free account
hub / github.com/aarnphm/whispercpp / new_segment_callback_handler

Function new_segment_callback_handler

src/whispercpp/params.cc:37–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37void new_segment_callback_handler(whisper_context *ctx,
38 whisper_state * /* state */, int n_new,
39 void *user_data) {
40 auto new_segment_callback =
41 (CallbackAndContext<Params::NewSegmentCallback>::Container *)user_data;
42 auto callback = new_segment_callback->callback;
43 if (callback != nullptr) {
44 (*callback)(*new_segment_callback->context, n_new);
45 }
46}
47
48Params Params::from_enum(whisper_sampling_strategy *enum_) {
49 SamplingStrategies ss = SamplingStrategies::from_enum(enum_);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected