pub struct AsyncWhisperStream { /* private fields */ }Expand description
An async streaming transcriber with channels for audio input
Implementations§
Source§impl AsyncWhisperStream
impl AsyncWhisperStream
Sourcepub fn new(context: WhisperContext, params: FullParams) -> Result<Self>
pub fn new(context: WhisperContext, params: FullParams) -> Result<Self>
Create a new async streaming transcriber
Sourcepub fn with_config(
context: WhisperContext,
params: FullParams,
config: WhisperStreamConfig,
) -> Result<Self>
pub fn with_config( context: WhisperContext, params: FullParams, config: WhisperStreamConfig, ) -> Result<Self>
Create a new async streaming transcriber with custom configuration
Sourcepub async fn recv_segments(&mut self) -> Option<Vec<Segment>>
pub async fn recv_segments(&mut self) -> Option<Vec<Segment>>
Receive transcribed segments if available
Sourcepub fn try_recv_segments(&mut self) -> Option<Vec<Segment>>
pub fn try_recv_segments(&mut self) -> Option<Vec<Segment>>
Try to receive segments without blocking
Auto Trait Implementations§
impl Freeze for AsyncWhisperStream
impl RefUnwindSafe for AsyncWhisperStream
impl Send for AsyncWhisperStream
impl Sync for AsyncWhisperStream
impl Unpin for AsyncWhisperStream
impl UnwindSafe for AsyncWhisperStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more