pub struct GoogleTtsProvider { /* private fields */ }Expand description
Google Cloud TTS model_provider (POST /v1/text:synthesize).
Implementations§
Source§impl GoogleTtsProvider
impl GoogleTtsProvider
Sourcepub fn new(alias: &str, config: &TtsProviderConfig) -> Result<Self>
pub fn new(alias: &str, config: &TtsProviderConfig) -> Result<Self>
Create a new Google Cloud TTS model_provider from config, resolving the API key
from [tts_providers.google.<alias>].api_key. Legacy
GOOGLE_TTS_API_KEY env-var fallback eradicated in V0.8.0.
Trait Implementations§
Source§impl Attributable for GoogleTtsProvider
impl Attributable for GoogleTtsProvider
Source§impl TtsProvider for GoogleTtsProvider
impl TtsProvider for GoogleTtsProvider
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 GoogleTtsProvider
impl !RefUnwindSafe for GoogleTtsProvider
impl Send for GoogleTtsProvider
impl Sync for GoogleTtsProvider
impl Unpin for GoogleTtsProvider
impl UnsafeUnpin for GoogleTtsProvider
impl !UnwindSafe for GoogleTtsProvider
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