pub struct ElevenLabsTtsProvider { /* private fields */ }Expand description
ElevenLabs TTS model_provider (POST /v1/text-to-speech/{voice_id}).
Implementations§
Source§impl ElevenLabsTtsProvider
impl ElevenLabsTtsProvider
Sourcepub fn new(alias: &str, config: &TtsProviderConfig) -> Result<Self>
pub fn new(alias: &str, config: &TtsProviderConfig) -> Result<Self>
Create a new ElevenLabs TTS model_provider from config. Reads
[tts_providers.elevenlabs.<alias>].api_key. Legacy
ELEVENLABS_API_KEY env-var fallback eradicated in V0.8.0.
Trait Implementations§
Source§impl Attributable for ElevenLabsTtsProvider
impl Attributable for ElevenLabsTtsProvider
Source§impl TtsProvider for ElevenLabsTtsProvider
impl TtsProvider for ElevenLabsTtsProvider
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 ElevenLabsTtsProvider
impl !RefUnwindSafe for ElevenLabsTtsProvider
impl Send for ElevenLabsTtsProvider
impl Sync for ElevenLabsTtsProvider
impl Unpin for ElevenLabsTtsProvider
impl UnsafeUnpin for ElevenLabsTtsProvider
impl !UnwindSafe for ElevenLabsTtsProvider
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