whisper-rs
whisper-rs copied to clipboard
Adds safe bindings for set_new_segment_callback
As the title implies. Introduces set_segment_callback_safe
.
self.fp.new_segment_callback_user_data = closure as *mut c_void;
self.fp.new_segment_callback = Some(trampoline::<SegmentCallbackFn>);
self.segment_calllback_safe = None;
It is bug here. Should be:
self.segment_calllback_safe = Some(Box::new(closure));
As the title implies. Introduces
set_segment_callback_safe
.
Thanks! I already use it in the project vibe and it works great as is (although I created new one lossy to ignore bad utf-8 errors)
Does it gonna be merged?
Superseded by #153