Skip to main content

ChunkStream

Trait ChunkStream 

Source
pub trait ChunkStream: Send {
    // Required methods
    fn chunk_samples(&self) -> usize;
    fn feed(&mut self, chunk: &[f32]) -> Result<Emitted, TranscriptionError>;
}
Expand description

One live decode of an engine that streams natively: audio in by the chunk, final words out. A word that came out is never revised.

Required Methods§

Source

fn chunk_samples(&self) -> usize

How many canonical samples the encoder takes per step.

Source

fn feed(&mut self, chunk: &[f32]) -> Result<Emitted, TranscriptionError>

Feeds one chunk, exactly chunk_samples long, and answers with what it let go of.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§