Skip to main content

Engine

Trait Engine 

Source
pub trait Engine: Send + Sync {
    // Required method
    fn speak(&self, request: SpeakRequest) -> Receiver<Result<Chunk, Error>>;
}
Expand description

Text-to-speech rendering. Channels rather than &mut self, so a caller can hold one engine and serve every queue without a mutex on the render path.

Required Methods§

Source

fn speak(&self, request: SpeakRequest) -> Receiver<Result<Chunk, Error>>

Render one utterance. Chunks arrive in order and the channel closes when the render finishes or fails; the host may stop reading at any time.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§