pub struct MockTts {
pub rate: u32,
}Expand description
A mock TTS: turns text into a TtsStarted + one TtsAudio chunk (silence
sized to the text length) + TtsStopped. Provider implementations replace this
with real backends.
Fields§
§rate: u32Implementations§
Trait Implementations§
Source§impl TtsService for MockTts
impl TtsService for MockTts
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,
Auto Trait Implementations§
impl Freeze for MockTts
impl RefUnwindSafe for MockTts
impl Send for MockTts
impl Sync for MockTts
impl Unpin for MockTts
impl UnsafeUnpin for MockTts
impl UnwindSafe for MockTts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more