Struct TtsManager
pub struct TtsManager { /* private fields */ }Implementations§
Source§impl TtsManager
impl TtsManager
pub fn from_config(config: &Config) -> Result<TtsManager, Error>
pub fn from_config_for_agent( config: &Config, agent_alias: Option<&str>, ) -> Result<TtsManager, Error>
pub async fn synthesize_opus(&self, text: &str) -> Result<Vec<u8>, Error>
pub async fn synthesize(&self, text: &str) -> Result<Vec<u8>, Error>
Sourcepub async fn synthesize_with_voice(
&self,
text: &str,
voice: &str,
) -> Result<Vec<u8>, Error>
pub async fn synthesize_with_voice( &self, text: &str, voice: &str, ) -> Result<Vec<u8>, Error>
Synthesize text using the runtime-active agent’s resolved
tts_provider reference and an explicit voice.
Sourcepub async fn synthesize_with_provider(
&self,
text: &str,
provider_alias: &str,
voice: &str,
) -> Result<Vec<u8>, Error>
pub async fn synthesize_with_provider( &self, text: &str, provider_alias: &str, voice: &str, ) -> Result<Vec<u8>, Error>
Synthesize text using a specific dotted-alias model_provider and voice.
Sourcepub fn available_providers(&self) -> Vec<String>
pub fn available_providers(&self) -> Vec<String>
List dotted aliases of all initialized tts_providers.
pub fn agent_output_format(&self) -> Option<&str>
Auto Trait Implementations§
impl Freeze for TtsManager
impl !RefUnwindSafe for TtsManager
impl Send for TtsManager
impl Sync for TtsManager
impl Unpin for TtsManager
impl UnsafeUnpin for TtsManager
impl !UnwindSafe for TtsManager
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