Skip to main content

StreamingTranscriber

Trait StreamingTranscriber 

Source
pub trait StreamingTranscriber {
    // Required methods
    fn chunk_samples(&self) -> usize;
    fn step(&mut self, chunk: &[f32]) -> Result<String>;
    fn reset(&mut self);
}
Expand description

A streaming speech model with per-utterance state.

Required Methods§

Source

fn chunk_samples(&self) -> usize

Samples the model takes per step (e.g. 2560 = 160 ms).

Source

fn step(&mut self, chunk: &[f32]) -> Result<String>

Feed one chunk; returns the text it adds (may be empty).

Source

fn reset(&mut self)

Forget the previous utterance.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§