pub struct RestSynthesizer { /* private fields */ }
Expand description
The synthesizer that uses the RESTful API.
Implementations§
Source§impl RestSynthesizer
impl RestSynthesizer
Sourcepub async fn synthesize_ssml(
&self,
ssml: &str,
) -> Result<Vec<u8>, RestSynthesizerError>
pub async fn synthesize_ssml( &self, ssml: &str, ) -> Result<Vec<u8>, RestSynthesizerError>
Synthesize the given SSML into audio(Vec<u8>
).
Sourcepub async fn synthesize_ssml_to_bytes(
&self,
ssml: &str,
) -> Result<Bytes, RestSynthesizerError>
pub async fn synthesize_ssml_to_bytes( &self, ssml: &str, ) -> Result<Bytes, RestSynthesizerError>
Synthesize the given SSML into audio(bytes::Bytes
).
Sourcepub async fn synthesize_text(
&self,
text: impl AsRef<str>,
options: &TextOptions<'_>,
) -> Result<Vec<u8>, RestSynthesizerError>
pub async fn synthesize_text( &self, text: impl AsRef<str>, options: &TextOptions<'_>, ) -> Result<Vec<u8>, RestSynthesizerError>
This is a convenience method that interpolates the SSML for you.
Sourcepub async fn synthesize_text_to_bytes(
&self,
text: impl AsRef<str>,
options: &TextOptions<'_>,
) -> Result<Bytes, RestSynthesizerError>
pub async fn synthesize_text_to_bytes( &self, text: impl AsRef<str>, options: &TextOptions<'_>, ) -> Result<Bytes, RestSynthesizerError>
This is a convenience method that interpolates the SSML for you.
Trait Implementations§
Source§impl UnifiedSynthesizer for RestSynthesizer
impl UnifiedSynthesizer for RestSynthesizer
Source§fn process_ssml<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ssml: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, UnifiedSynthesizerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_ssml<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ssml: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, UnifiedSynthesizerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Synthesize the given SSML into audio(
Vec<u8>
).Source§fn process_text<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
text: &'life1 str,
options: &'life2 TextOptions<'life3>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, UnifiedSynthesizerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn process_text<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
text: &'life1 str,
options: &'life2 TextOptions<'life3>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, UnifiedSynthesizerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
This is a convenience method that interpolates the SSML for you.
Auto Trait Implementations§
impl Freeze for RestSynthesizer
impl !RefUnwindSafe for RestSynthesizer
impl Send for RestSynthesizer
impl Sync for RestSynthesizer
impl Unpin for RestSynthesizer
impl !UnwindSafe for RestSynthesizer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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