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

Method from_buffer

src/whispercpp/context.cc:73–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73Context Context::from_buffer(void *buffer, size_t buffer_size, bool no_state) {
74 Context c;
75 NO_STATE_WARNING(no_state);
76
77 if (no_state) {
78 c.set_context(whisper_init_from_buffer_no_state(buffer, buffer_size));
79 } else {
80 c.set_context(whisper_init_from_buffer(buffer, buffer_size));
81 c.set_init_with_state(true);
82 }
83 RAISE_IF_NULL(c.wctx);
84 return c;
85}
86
87void Context::free_state() {
88 whisper_free_state(wstate);

Callers 1

test_from_bufferFunction · 0.80

Calls 2

set_contextMethod · 0.80
set_init_with_stateMethod · 0.80

Tested by 1

test_from_bufferFunction · 0.64