Struct EdgeTtsProvider
pub struct EdgeTtsProvider { /* private fields */ }Expand description
Edge TTS model_provider — free, uses the edge-tts CLI subprocess.
Implementations§
Source§impl EdgeTtsProvider
impl EdgeTtsProvider
pub fn new(alias: &str, config: &TtsProviderConfig) -> Result<Self>
Trait Implementations§
Source§impl Attributable for EdgeTtsProvider
impl Attributable for EdgeTtsProvider
Source§impl TtsProvider for EdgeTtsProvider
impl TtsProvider for EdgeTtsProvider
Source§fn output_format(&self) -> &str
fn output_format(&self) -> &str
The audio container/format of the bytes returned by
synthesize (e.g. "opus", "wav", "mp3").
Channels use this to pick the correct upload MIME type and Telegram
send method — only opus/ogg is a true voice note.Source§fn synthesize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
voice: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn synthesize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
voice: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Synthesize
text using the given voice, returning raw audio bytes.Source§fn supported_voices(&self) -> Vec<String>
fn supported_voices(&self) -> Vec<String>
Voices supported by this model_provider.
Source§fn supported_formats(&self) -> Vec<String>
fn supported_formats(&self) -> Vec<String>
Audio output formats supported by this model_provider.
Auto Trait Implementations§
impl Freeze for EdgeTtsProvider
impl RefUnwindSafe for EdgeTtsProvider
impl Send for EdgeTtsProvider
impl Sync for EdgeTtsProvider
impl Unpin for EdgeTtsProvider
impl UnsafeUnpin for EdgeTtsProvider
impl UnwindSafe for EdgeTtsProvider
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more