Skip to main content

LocalTtsEngine

Trait LocalTtsEngine 

Source
pub trait LocalTtsEngine: Send + Sync {
    // Required method
    fn synthesize<'life0, 'life1, 'async_trait>(
        &'life0 self,
        text: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, String), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for the local TTS engine (e.g., sherpa-rs piper).

Required Methods§

Source

fn synthesize<'life0, 'life1, 'async_trait>( &'life0 self, text: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, String), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Synthesize text to audio. Returns (audio_data, mime_type).

Implementors§