@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AmazonPollyAsyncClient extends AmazonPollyClient implements AmazonPollyAsync
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
Amazon Polly is a web service that makes it easy to synthesize speech from text.
The Amazon Polly service provides API operations for synthesizing high-quality speech from plain text and Speech Synthesis Markup Language (SSML), along with managing pronunciations lexicons that enable you to get the best results for your application domain.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AmazonPollyAsyncClient()
Deprecated.
|
AmazonPollyAsyncClient(AWSCredentials awsCredentials)
Deprecated.
|
AmazonPollyAsyncClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
|
AmazonPollyAsyncClient(AWSCredentials awsCredentials,
ExecutorService executorService)
|
AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Deprecated.
|
AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
|
AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
|
AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ExecutorService executorService)
|
AmazonPollyAsyncClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static AmazonPollyAsyncClientBuilder |
asyncBuilder() |
Future<DeleteLexiconResult> |
deleteLexiconAsync(DeleteLexiconRequest request)
Deletes the specified pronunciation lexicon stored in an AWS Region.
|
Future<DeleteLexiconResult> |
deleteLexiconAsync(DeleteLexiconRequest request,
AsyncHandler<DeleteLexiconRequest,DeleteLexiconResult> asyncHandler)
Deletes the specified pronunciation lexicon stored in an AWS Region.
|
Future<DescribeVoicesResult> |
describeVoicesAsync(DescribeVoicesRequest request)
Returns the list of voices that are available for use when requesting speech synthesis.
|
Future<DescribeVoicesResult> |
describeVoicesAsync(DescribeVoicesRequest request,
AsyncHandler<DescribeVoicesRequest,DescribeVoicesResult> asyncHandler)
Returns the list of voices that are available for use when requesting speech synthesis.
|
ExecutorService |
getExecutorService()
Returns the executor service used by this client to execute async requests.
|
Future<GetLexiconResult> |
getLexiconAsync(GetLexiconRequest request)
Returns the content of the specified pronunciation lexicon stored in an AWS Region.
|
Future<GetLexiconResult> |
getLexiconAsync(GetLexiconRequest request,
AsyncHandler<GetLexiconRequest,GetLexiconResult> asyncHandler)
Returns the content of the specified pronunciation lexicon stored in an AWS Region.
|
Future<ListLexiconsResult> |
listLexiconsAsync(ListLexiconsRequest request)
Returns a list of pronunciation lexicons stored in an AWS Region.
|
Future<ListLexiconsResult> |
listLexiconsAsync(ListLexiconsRequest request,
AsyncHandler<ListLexiconsRequest,ListLexiconsResult> asyncHandler)
Returns a list of pronunciation lexicons stored in an AWS Region.
|
Future<PutLexiconResult> |
putLexiconAsync(PutLexiconRequest request)
Stores a pronunciation lexicon in an AWS Region.
|
Future<PutLexiconResult> |
putLexiconAsync(PutLexiconRequest request,
AsyncHandler<PutLexiconRequest,PutLexiconResult> asyncHandler)
Stores a pronunciation lexicon in an AWS Region.
|
void |
shutdown()
Shuts down the client, releasing all managed resources.
|
Future<SynthesizeSpeechResult> |
synthesizeSpeechAsync(SynthesizeSpeechRequest request)
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes.
|
Future<SynthesizeSpeechResult> |
synthesizeSpeechAsync(SynthesizeSpeechRequest request,
AsyncHandler<SynthesizeSpeechRequest,SynthesizeSpeechResult> asyncHandler)
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes.
|
builder, deleteLexicon, describeVoices, getCachedResponseMetadata, getLexicon, listLexicons, presigners, putLexicon, synthesizeSpeech
addRequestHandler, addRequestHandler, configureRegion, getEndpointPrefix, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteLexicon, describeVoices, getCachedResponseMetadata, getLexicon, listLexicons, presigners, putLexicon, setEndpoint, setRegion, synthesizeSpeech
@Deprecated public AmazonPollyAsyncClient()
AmazonPollyAsyncClientBuilder.defaultClient()
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
@Deprecated public AmazonPollyAsyncClient(ClientConfiguration clientConfiguration)
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
maximum number of concurrent connections configured via ClientConfiguration.getMaxConnections()
.
clientConfiguration
- The client configuration options controlling how this client connects to Amazon Polly (ex: proxy settings,
retry counts, etc).DefaultAWSCredentialsProviderChain
,
Executors.newFixedThreadPool(int)
@Deprecated public AmazonPollyAsyncClient(AWSCredentials awsCredentials)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.Executors.newFixedThreadPool(int)
@Deprecated public AmazonPollyAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.executorService
- The executor service by which all asynchronous requests will be executed.@Deprecated public AmazonPollyAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).executorService
- The executor service by which all asynchronous requests will be executed.@Deprecated public AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.Executors.newFixedThreadPool(int)
@Deprecated public AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
maximum number of concurrent connections configured via ClientConfiguration.getMaxConnections()
.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).DefaultAWSCredentialsProviderChain
,
Executors.newFixedThreadPool(int)
@Deprecated public AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.executorService
- The executor service by which all asynchronous requests will be executed.@Deprecated public AmazonPollyAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).executorService
- The executor service by which all asynchronous requests will be executed.public static AmazonPollyAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<DeleteLexiconResult> deleteLexiconAsync(DeleteLexiconRequest request)
AmazonPollyAsync
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.
deleteLexiconAsync
in interface AmazonPollyAsync
public Future<DeleteLexiconResult> deleteLexiconAsync(DeleteLexiconRequest request, AsyncHandler<DeleteLexiconRequest,DeleteLexiconResult> asyncHandler)
AmazonPollyAsync
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.
deleteLexiconAsync
in interface AmazonPollyAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DescribeVoicesResult> describeVoicesAsync(DescribeVoicesRequest request)
AmazonPollyAsync
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.
describeVoicesAsync
in interface AmazonPollyAsync
public Future<DescribeVoicesResult> describeVoicesAsync(DescribeVoicesRequest request, AsyncHandler<DescribeVoicesRequest,DescribeVoicesResult> asyncHandler)
AmazonPollyAsync
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.
describeVoicesAsync
in interface AmazonPollyAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetLexiconResult> getLexiconAsync(GetLexiconRequest request)
AmazonPollyAsync
Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
getLexiconAsync
in interface AmazonPollyAsync
public Future<GetLexiconResult> getLexiconAsync(GetLexiconRequest request, AsyncHandler<GetLexiconRequest,GetLexiconResult> asyncHandler)
AmazonPollyAsync
Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
getLexiconAsync
in interface AmazonPollyAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListLexiconsResult> listLexiconsAsync(ListLexiconsRequest request)
AmazonPollyAsync
Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
listLexiconsAsync
in interface AmazonPollyAsync
public Future<ListLexiconsResult> listLexiconsAsync(ListLexiconsRequest request, AsyncHandler<ListLexiconsRequest,ListLexiconsResult> asyncHandler)
AmazonPollyAsync
Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
listLexiconsAsync
in interface AmazonPollyAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<PutLexiconResult> putLexiconAsync(PutLexiconRequest request)
AmazonPollyAsync
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.
putLexiconAsync
in interface AmazonPollyAsync
public Future<PutLexiconResult> putLexiconAsync(PutLexiconRequest request, AsyncHandler<PutLexiconRequest,PutLexiconResult> asyncHandler)
AmazonPollyAsync
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.
putLexiconAsync
in interface AmazonPollyAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<SynthesizeSpeechResult> synthesizeSpeechAsync(SynthesizeSpeechRequest request)
AmazonPollyAsync
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.
synthesizeSpeechAsync
in interface AmazonPollyAsync
public Future<SynthesizeSpeechResult> synthesizeSpeechAsync(SynthesizeSpeechRequest request, AsyncHandler<SynthesizeSpeechRequest,SynthesizeSpeechResult> asyncHandler)
AmazonPollyAsync
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.
synthesizeSpeechAsync
in interface AmazonPollyAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public void shutdown()
getExecutorService().shutdown()
followed by getExecutorService().awaitTermination()
prior to
calling this method.shutdown
in interface AmazonPolly
shutdown
in class AmazonWebServiceClient
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.