pub trait TtsEngine: InferenceEngine {
// Required methods
fn synthesize_speech<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
language: Option<&'life2 str>,
chunk_frames: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn tts_sample_rate(&self) -> u32;
}Expand description
Text-to-speech (Qwen3-TTS, etc.) engine.
Backs /v1/audio/speech.
Required Methods§
Sourcefn synthesize_speech<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
language: Option<&'life2 str>,
chunk_frames: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn synthesize_speech<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
language: Option<&'life2 str>,
chunk_frames: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Synthesize speech → PCM audio chunks (streaming). Returns Vec of PCM f32 samples per chunk.
Sourcefn tts_sample_rate(&self) -> u32
fn tts_sample_rate(&self) -> u32
Get TTS sample rate.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".