pub trait TtsService: Send {
// Required methods
fn name(&self) -> &str;
fn sample_rate(&self) -> u32;
fn start<'life0, 'life1, 'async_trait>(
&'life0 mut self,
params: &'life1 StartParams,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn run_tts<'life0, 'life1, 'async_trait>(
&'life0 mut self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Frame>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Streaming text→speech. Consumes TtsSpeak/Text, emits TtsStarted,
TtsAudio*, TtsStopped. Mirrors pipecat TTSService.
Required Methods§
fn name(&self) -> &str
fn sample_rate(&self) -> u32
fn start<'life0, 'life1, 'async_trait>(
&'life0 mut self,
params: &'life1 StartParams,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_tts<'life0, 'life1, 'async_trait>(
&'life0 mut self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Frame>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Trait Implementations§
Source§impl TtsService for Box<dyn TtsService>
impl TtsService for Box<dyn TtsService>
fn name(&self) -> &str
fn sample_rate(&self) -> u32
fn start<'life0, 'life1, 'async_trait>(
&'life0 mut self,
params: &'life1 StartParams,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_tts<'life0, 'life1, 'async_trait>(
&'life0 mut self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Frame>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".