Struct rusoto_polly::PollyClient
source · [−]pub struct PollyClient { /* private fields */ }
Expand description
A client for the Amazon Polly API.
Implementations
sourceimpl PollyClient
impl PollyClient
sourcepub fn new(region: Region) -> PollyClient
pub fn new(region: Region) -> PollyClient
Creates a client backed by the default tokio event loop.
The client will use the default credentials provider and tls client.
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: Region
) -> PollyClient where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
pub fn new_with_client(client: Client, region: Region) -> PollyClient
Trait Implementations
sourceimpl Clone for PollyClient
impl Clone for PollyClient
sourcefn clone(&self) -> PollyClient
fn clone(&self) -> PollyClient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Polly for PollyClient
impl Polly for PollyClient
sourcefn delete_lexicon<'life0, 'async_trait>(
&'life0 self,
input: DeleteLexiconInput
) -> Pin<Box<dyn Future<Output = Result<DeleteLexiconOutput, RusotoError<DeleteLexiconError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete_lexicon<'life0, 'async_trait>(
&'life0 self,
input: DeleteLexiconInput
) -> Pin<Box<dyn Future<Output = Result<DeleteLexiconOutput, RusotoError<DeleteLexiconError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon
or ListLexicon
APIs.
For more information, see Managing Lexicons.
sourcefn describe_voices<'life0, 'async_trait>(
&'life0 self,
input: DescribeVoicesInput
) -> Pin<Box<dyn Future<Output = Result<DescribeVoicesOutput, RusotoError<DescribeVoicesError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn describe_voices<'life0, 'async_trait>(
&'life0 self,
input: DescribeVoicesInput
) -> Pin<Box<dyn Future<Output = Result<DescribeVoicesOutput, RusotoError<DescribeVoicesError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name.
When synthesizing speech ( SynthesizeSpeech
), you provide the voice ID for the voice you want from the list of voices returned by DescribeVoices
.
For example, you want your news reader application to read news in a specific language, but giving a user the option to choose the voice. Using the DescribeVoices
operation you can provide the user with a list of available voices to select from.
You can optionally specify a language code to filter the available voices. For example, if you specify en-US
, the operation returns a list of all available US English voices.
This operation requires permissions to perform the polly:DescribeVoices
action.
sourcefn get_lexicon<'life0, 'async_trait>(
&'life0 self,
input: GetLexiconInput
) -> Pin<Box<dyn Future<Output = Result<GetLexiconOutput, RusotoError<GetLexiconError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_lexicon<'life0, 'async_trait>(
&'life0 self,
input: GetLexiconInput
) -> Pin<Box<dyn Future<Output = Result<GetLexiconOutput, RusotoError<GetLexiconError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
sourcefn get_speech_synthesis_task<'life0, 'async_trait>(
&'life0 self,
input: GetSpeechSynthesisTaskInput
) -> Pin<Box<dyn Future<Output = Result<GetSpeechSynthesisTaskOutput, RusotoError<GetSpeechSynthesisTaskError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_speech_synthesis_task<'life0, 'async_trait>(
&'life0 self,
input: GetSpeechSynthesisTaskInput
) -> Pin<Box<dyn Future<Output = Result<GetSpeechSynthesisTaskOutput, RusotoError<GetSpeechSynthesisTaskError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task.
sourcefn list_lexicons<'life0, 'async_trait>(
&'life0 self,
input: ListLexiconsInput
) -> Pin<Box<dyn Future<Output = Result<ListLexiconsOutput, RusotoError<ListLexiconsError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn list_lexicons<'life0, 'async_trait>(
&'life0 self,
input: ListLexiconsInput
) -> Pin<Box<dyn Future<Output = Result<ListLexiconsOutput, RusotoError<ListLexiconsError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
sourcefn list_speech_synthesis_tasks<'life0, 'async_trait>(
&'life0 self,
input: ListSpeechSynthesisTasksInput
) -> Pin<Box<dyn Future<Output = Result<ListSpeechSynthesisTasksOutput, RusotoError<ListSpeechSynthesisTasksError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn list_speech_synthesis_tasks<'life0, 'async_trait>(
&'life0 self,
input: ListSpeechSynthesisTasksInput
) -> Pin<Box<dyn Future<Output = Result<ListSpeechSynthesisTasksOutput, RusotoError<ListSpeechSynthesisTasksError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns a list of SpeechSynthesisTask objects ordered by their creation date. This operation can filter the tasks by their status, for example, allowing users to list only tasks that are completed.
sourcefn put_lexicon<'life0, 'async_trait>(
&'life0 self,
input: PutLexiconInput
) -> Pin<Box<dyn Future<Output = Result<PutLexiconOutput, RusotoError<PutLexiconError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn put_lexicon<'life0, 'async_trait>(
&'life0 self,
input: PutLexiconInput
) -> Pin<Box<dyn Future<Output = Result<PutLexiconOutput, RusotoError<PutLexiconError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation.
For more information, see Managing Lexicons.
sourcefn start_speech_synthesis_task<'life0, 'async_trait>(
&'life0 self,
input: StartSpeechSynthesisTaskInput
) -> Pin<Box<dyn Future<Output = Result<StartSpeechSynthesisTaskOutput, RusotoError<StartSpeechSynthesisTaskError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn start_speech_synthesis_task<'life0, 'async_trait>(
&'life0 self,
input: StartSpeechSynthesisTaskInput
) -> Pin<Box<dyn Future<Output = Result<StartSpeechSynthesisTaskOutput, RusotoError<StartSpeechSynthesisTaskError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Allows the creation of an asynchronous synthesis task, by starting a new SpeechSynthesisTask
. This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status.
sourcefn synthesize_speech<'life0, 'async_trait>(
&'life0 self,
input: SynthesizeSpeechInput
) -> Pin<Box<dyn Future<Output = Result<SynthesizeSpeechOutput, RusotoError<SynthesizeSpeechError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn synthesize_speech<'life0, 'async_trait>(
&'life0 self,
input: SynthesizeSpeechInput
) -> Pin<Box<dyn Future<Output = Result<SynthesizeSpeechOutput, RusotoError<SynthesizeSpeechError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see How it Works.
Auto Trait Implementations
impl !RefUnwindSafe for PollyClient
impl Send for PollyClient
impl Sync for PollyClient
impl Unpin for PollyClient
impl !UnwindSafe for PollyClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more