-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Is there any method for clearing context manually or state management like whisper-rs (whisper.cpp's binding for rust)? https://github.com/tazz4843/whisper-rs
specifically something like this
// now we can run the model
let mut state = ctx.create_state().expect("failed to create state");
state
.full(params, &audio_data[..])
.expect("failed to run model");
// fetch the results
let num_segments = state
.full_n_segments()
.expect("failed to get number of segments");
for i in 0..num_segments {
let segment = state
.full_get_segment_text(i)
.expect("failed to get segment");
let start_timestamp = state
.full_get_segment_t0(i)
.expect("failed to get segment start timestamp");
let end_timestamp = state
.full_get_segment_t1(i)
.expect("failed to get segment end timestamp");
println!("[{} - {}]: {}", start_timestamp, end_timestamp, segment);
}
Metadata
Metadata
Assignees
Labels
No labels