@Generated(value="software.amazon.awssdk:codegen") public interface PollyAsyncClient extends SdkClient
builder()
method.
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.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static PollyAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
PollyAsyncClient . |
static PollyAsyncClient |
create()
Create a
PollyAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CompletableFuture<DeleteLexiconResponse> |
deleteLexicon(Consumer<DeleteLexiconRequest.Builder> deleteLexiconRequest)
Deletes the specified pronunciation lexicon stored in an AWS Region.
|
default CompletableFuture<DeleteLexiconResponse> |
deleteLexicon(DeleteLexiconRequest deleteLexiconRequest)
Deletes the specified pronunciation lexicon stored in an AWS Region.
|
default CompletableFuture<DescribeVoicesResponse> |
describeVoices()
Returns the list of voices that are available for use when requesting speech synthesis.
|
default CompletableFuture<DescribeVoicesResponse> |
describeVoices(Consumer<DescribeVoicesRequest.Builder> describeVoicesRequest)
Returns the list of voices that are available for use when requesting speech synthesis.
|
default CompletableFuture<DescribeVoicesResponse> |
describeVoices(DescribeVoicesRequest describeVoicesRequest)
Returns the list of voices that are available for use when requesting speech synthesis.
|
default CompletableFuture<GetLexiconResponse> |
getLexicon(Consumer<GetLexiconRequest.Builder> getLexiconRequest)
Returns the content of the specified pronunciation lexicon stored in an AWS Region.
|
default CompletableFuture<GetLexiconResponse> |
getLexicon(GetLexiconRequest getLexiconRequest)
Returns the content of the specified pronunciation lexicon stored in an AWS Region.
|
default CompletableFuture<GetSpeechSynthesisTaskResponse> |
getSpeechSynthesisTask(Consumer<GetSpeechSynthesisTaskRequest.Builder> getSpeechSynthesisTaskRequest)
Retrieves a specific SpeechSynthesisTask object based on its TaskID.
|
default CompletableFuture<GetSpeechSynthesisTaskResponse> |
getSpeechSynthesisTask(GetSpeechSynthesisTaskRequest getSpeechSynthesisTaskRequest)
Retrieves a specific SpeechSynthesisTask object based on its TaskID.
|
default CompletableFuture<ListLexiconsResponse> |
listLexicons()
Returns a list of pronunciation lexicons stored in an AWS Region.
|
default CompletableFuture<ListLexiconsResponse> |
listLexicons(Consumer<ListLexiconsRequest.Builder> listLexiconsRequest)
Returns a list of pronunciation lexicons stored in an AWS Region.
|
default CompletableFuture<ListLexiconsResponse> |
listLexicons(ListLexiconsRequest listLexiconsRequest)
Returns a list of pronunciation lexicons stored in an AWS Region.
|
default CompletableFuture<ListSpeechSynthesisTasksResponse> |
listSpeechSynthesisTasks()
Returns a list of SpeechSynthesisTask objects ordered by their creation date.
|
default CompletableFuture<ListSpeechSynthesisTasksResponse> |
listSpeechSynthesisTasks(Consumer<ListSpeechSynthesisTasksRequest.Builder> listSpeechSynthesisTasksRequest)
Returns a list of SpeechSynthesisTask objects ordered by their creation date.
|
default CompletableFuture<ListSpeechSynthesisTasksResponse> |
listSpeechSynthesisTasks(ListSpeechSynthesisTasksRequest listSpeechSynthesisTasksRequest)
Returns a list of SpeechSynthesisTask objects ordered by their creation date.
|
default ListSpeechSynthesisTasksPublisher |
listSpeechSynthesisTasksPaginator()
Returns a list of SpeechSynthesisTask objects ordered by their creation date.
|
default ListSpeechSynthesisTasksPublisher |
listSpeechSynthesisTasksPaginator(Consumer<ListSpeechSynthesisTasksRequest.Builder> listSpeechSynthesisTasksRequest)
Returns a list of SpeechSynthesisTask objects ordered by their creation date.
|
default ListSpeechSynthesisTasksPublisher |
listSpeechSynthesisTasksPaginator(ListSpeechSynthesisTasksRequest listSpeechSynthesisTasksRequest)
Returns a list of SpeechSynthesisTask objects ordered by their creation date.
|
default CompletableFuture<PutLexiconResponse> |
putLexicon(Consumer<PutLexiconRequest.Builder> putLexiconRequest)
Stores a pronunciation lexicon in an AWS Region.
|
default CompletableFuture<PutLexiconResponse> |
putLexicon(PutLexiconRequest putLexiconRequest)
Stores a pronunciation lexicon in an AWS Region.
|
default CompletableFuture<StartSpeechSynthesisTaskResponse> |
startSpeechSynthesisTask(Consumer<StartSpeechSynthesisTaskRequest.Builder> startSpeechSynthesisTaskRequest)
Allows the creation of an asynchronous synthesis task, by starting a new
SpeechSynthesisTask . |
default CompletableFuture<StartSpeechSynthesisTaskResponse> |
startSpeechSynthesisTask(StartSpeechSynthesisTaskRequest startSpeechSynthesisTaskRequest)
Allows the creation of an asynchronous synthesis task, by starting a new
SpeechSynthesisTask . |
default <ReturnT> CompletableFuture<ReturnT> |
synthesizeSpeech(Consumer<SynthesizeSpeechRequest.Builder> synthesizeSpeechRequest,
AsyncResponseTransformer<SynthesizeSpeechResponse,ReturnT> asyncResponseTransformer)
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes.
|
default CompletableFuture<SynthesizeSpeechResponse> |
synthesizeSpeech(Consumer<SynthesizeSpeechRequest.Builder> synthesizeSpeechRequest,
Path destinationPath)
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes.
|
default <ReturnT> CompletableFuture<ReturnT> |
synthesizeSpeech(SynthesizeSpeechRequest synthesizeSpeechRequest,
AsyncResponseTransformer<SynthesizeSpeechResponse,ReturnT> asyncResponseTransformer)
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes.
|
default CompletableFuture<SynthesizeSpeechResponse> |
synthesizeSpeech(SynthesizeSpeechRequest synthesizeSpeechRequest,
Path destinationPath)
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes.
|
serviceName
close
static final String SERVICE_NAME
static PollyAsyncClient create()
PollyAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static PollyAsyncClientBuilder builder()
PollyAsyncClient
.default CompletableFuture<DeleteLexiconResponse> deleteLexicon(DeleteLexiconRequest deleteLexiconRequest)
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.
deleteLexiconRequest
- Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
default CompletableFuture<DeleteLexiconResponse> deleteLexicon(Consumer<DeleteLexiconRequest.Builder> deleteLexiconRequest)
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.
This is a convenience which creates an instance of the DeleteLexiconRequest.Builder
avoiding the need to
create one manually via DeleteLexiconRequest.builder()
deleteLexiconRequest
- A Consumer
that will call methods on DeleteLexiconInput.Builder
to create a request.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
default CompletableFuture<DescribeVoicesResponse> describeVoices(DescribeVoicesRequest describeVoicesRequest)
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.
describeVoicesRequest
- default CompletableFuture<DescribeVoicesResponse> describeVoices(Consumer<DescribeVoicesRequest.Builder> describeVoicesRequest)
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.
This is a convenience which creates an instance of the DescribeVoicesRequest.Builder
avoiding the need to
create one manually via DescribeVoicesRequest.builder()
describeVoicesRequest
- A Consumer
that will call methods on DescribeVoicesInput.Builder
to create a request.default CompletableFuture<DescribeVoicesResponse> describeVoices()
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.
default CompletableFuture<GetLexiconResponse> getLexicon(GetLexiconRequest getLexiconRequest)
Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
getLexiconRequest
- Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
default CompletableFuture<GetLexiconResponse> getLexicon(Consumer<GetLexiconRequest.Builder> getLexiconRequest)
Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
This is a convenience which creates an instance of the GetLexiconRequest.Builder
avoiding the need to
create one manually via GetLexiconRequest.builder()
getLexiconRequest
- A Consumer
that will call methods on GetLexiconInput.Builder
to create a request.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
default CompletableFuture<GetSpeechSynthesisTaskResponse> getSpeechSynthesisTask(GetSpeechSynthesisTaskRequest getSpeechSynthesisTaskRequest)
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.
getSpeechSynthesisTaskRequest
- default CompletableFuture<GetSpeechSynthesisTaskResponse> getSpeechSynthesisTask(Consumer<GetSpeechSynthesisTaskRequest.Builder> getSpeechSynthesisTaskRequest)
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.
This is a convenience which creates an instance of the GetSpeechSynthesisTaskRequest.Builder
avoiding the
need to create one manually via GetSpeechSynthesisTaskRequest.builder()
getSpeechSynthesisTaskRequest
- A Consumer
that will call methods on GetSpeechSynthesisTaskInput.Builder
to create a
request.default CompletableFuture<ListLexiconsResponse> listLexicons(ListLexiconsRequest listLexiconsRequest)
Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
listLexiconsRequest
- default CompletableFuture<ListLexiconsResponse> listLexicons(Consumer<ListLexiconsRequest.Builder> listLexiconsRequest)
Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
This is a convenience which creates an instance of the ListLexiconsRequest.Builder
avoiding the need to
create one manually via ListLexiconsRequest.builder()
listLexiconsRequest
- A Consumer
that will call methods on ListLexiconsInput.Builder
to create a request.default CompletableFuture<ListLexiconsResponse> listLexicons()
Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
default CompletableFuture<ListSpeechSynthesisTasksResponse> listSpeechSynthesisTasks(ListSpeechSynthesisTasksRequest listSpeechSynthesisTasksRequest)
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.
listSpeechSynthesisTasksRequest
- default CompletableFuture<ListSpeechSynthesisTasksResponse> listSpeechSynthesisTasks(Consumer<ListSpeechSynthesisTasksRequest.Builder> listSpeechSynthesisTasksRequest)
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.
This is a convenience which creates an instance of the ListSpeechSynthesisTasksRequest.Builder
avoiding
the need to create one manually via ListSpeechSynthesisTasksRequest.builder()
listSpeechSynthesisTasksRequest
- A Consumer
that will call methods on ListSpeechSynthesisTasksInput.Builder
to create a
request.default CompletableFuture<ListSpeechSynthesisTasksResponse> listSpeechSynthesisTasks()
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.
default ListSpeechSynthesisTasksPublisher listSpeechSynthesisTasksPaginator()
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.
This is a variant of
listSpeechSynthesisTasks(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.polly.paginators.ListSpeechSynthesisTasksPublisher publisher = client.listSpeechSynthesisTasksPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.polly.paginators.ListSpeechSynthesisTasksPublisher publisher = client.listSpeechSynthesisTasksPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listSpeechSynthesisTasks(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksRequest)
operation.
default ListSpeechSynthesisTasksPublisher listSpeechSynthesisTasksPaginator(ListSpeechSynthesisTasksRequest listSpeechSynthesisTasksRequest)
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.
This is a variant of
listSpeechSynthesisTasks(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.polly.paginators.ListSpeechSynthesisTasksPublisher publisher = client.listSpeechSynthesisTasksPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.polly.paginators.ListSpeechSynthesisTasksPublisher publisher = client.listSpeechSynthesisTasksPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listSpeechSynthesisTasks(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksRequest)
operation.
listSpeechSynthesisTasksRequest
- default ListSpeechSynthesisTasksPublisher listSpeechSynthesisTasksPaginator(Consumer<ListSpeechSynthesisTasksRequest.Builder> listSpeechSynthesisTasksRequest)
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.
This is a variant of
listSpeechSynthesisTasks(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.polly.paginators.ListSpeechSynthesisTasksPublisher publisher = client.listSpeechSynthesisTasksPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.polly.paginators.ListSpeechSynthesisTasksPublisher publisher = client.listSpeechSynthesisTasksPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listSpeechSynthesisTasks(software.amazon.awssdk.services.polly.model.ListSpeechSynthesisTasksRequest)
operation.
This is a convenience which creates an instance of the ListSpeechSynthesisTasksRequest.Builder
avoiding
the need to create one manually via ListSpeechSynthesisTasksRequest.builder()
listSpeechSynthesisTasksRequest
- A Consumer
that will call methods on ListSpeechSynthesisTasksInput.Builder
to create a
request.default CompletableFuture<PutLexiconResponse> putLexicon(PutLexiconRequest putLexiconRequest)
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.
putLexiconRequest
- x-sampa
and ipa
.default CompletableFuture<PutLexiconResponse> putLexicon(Consumer<PutLexiconRequest.Builder> putLexiconRequest)
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.
This is a convenience which creates an instance of the PutLexiconRequest.Builder
avoiding the need to
create one manually via PutLexiconRequest.builder()
putLexiconRequest
- A Consumer
that will call methods on PutLexiconInput.Builder
to create a request.x-sampa
and ipa
.default CompletableFuture<StartSpeechSynthesisTaskResponse> startSpeechSynthesisTask(StartSpeechSynthesisTaskRequest startSpeechSynthesisTaskRequest)
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.
startSpeechSynthesisTaskRequest
- SynthesizeSpeech
API, the limit for input text is a maximum of 6000 characters total, of
which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask
API, the
maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not
counted as billed characters.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
OutputFormat
selected. Speech marks are only available for content in json
format.default CompletableFuture<StartSpeechSynthesisTaskResponse> startSpeechSynthesisTask(Consumer<StartSpeechSynthesisTaskRequest.Builder> startSpeechSynthesisTaskRequest)
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.
This is a convenience which creates an instance of the StartSpeechSynthesisTaskRequest.Builder
avoiding
the need to create one manually via StartSpeechSynthesisTaskRequest.builder()
startSpeechSynthesisTaskRequest
- A Consumer
that will call methods on StartSpeechSynthesisTaskInput.Builder
to create a
request.SynthesizeSpeech
API, the limit for input text is a maximum of 6000 characters total, of
which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask
API, the
maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not
counted as billed characters.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
OutputFormat
selected. Speech marks are only available for content in json
format.default <ReturnT> CompletableFuture<ReturnT> synthesizeSpeech(SynthesizeSpeechRequest synthesizeSpeechRequest, AsyncResponseTransformer<SynthesizeSpeechResponse,ReturnT> asyncResponseTransformer)
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.
synthesizeSpeechRequest
- asyncResponseTransformer
- The response transformer for processing the streaming response in a non-blocking manner. See
AsyncResponseTransformer
for details on how this callback should be implemented and for links to
precanned implementations for common scenarios like downloading to a file. The service documentation for
the response content is as follows '
Stream containing the synthesized speech.
'.SynthesizeSpeech
API, the limit for input text is a maximum of 6000 characters total, of
which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask
API, the
maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not
counted as billed characters.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
OutputFormat
selected. Speech marks are only available for content in json
format.default <ReturnT> CompletableFuture<ReturnT> synthesizeSpeech(Consumer<SynthesizeSpeechRequest.Builder> synthesizeSpeechRequest, AsyncResponseTransformer<SynthesizeSpeechResponse,ReturnT> asyncResponseTransformer)
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.
This is a convenience which creates an instance of the SynthesizeSpeechRequest.Builder
avoiding the need
to create one manually via SynthesizeSpeechRequest.builder()
synthesizeSpeechRequest
- A Consumer
that will call methods on SynthesizeSpeechInput.Builder
to create a request.asyncResponseTransformer
- The response transformer for processing the streaming response in a non-blocking manner. See
AsyncResponseTransformer
for details on how this callback should be implemented and for links to
precanned implementations for common scenarios like downloading to a file. The service documentation for
the response content is as follows '
Stream containing the synthesized speech.
'.SynthesizeSpeech
API, the limit for input text is a maximum of 6000 characters total, of
which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask
API, the
maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not
counted as billed characters.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
OutputFormat
selected. Speech marks are only available for content in json
format.default CompletableFuture<SynthesizeSpeechResponse> synthesizeSpeech(SynthesizeSpeechRequest synthesizeSpeechRequest, Path destinationPath)
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.
synthesizeSpeechRequest
- destinationPath
- Path
to file that response contents will be written to. The file must not exist or this method
will throw an exception. If the file is not writable by the current user then an exception will be thrown.
The service documentation for the response content is as follows '
Stream containing the synthesized speech.
'.SynthesizeSpeech
API, the limit for input text is a maximum of 6000 characters total, of
which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask
API, the
maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not
counted as billed characters.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
OutputFormat
selected. Speech marks are only available for content in json
format.default CompletableFuture<SynthesizeSpeechResponse> synthesizeSpeech(Consumer<SynthesizeSpeechRequest.Builder> synthesizeSpeechRequest, Path destinationPath)
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.
This is a convenience which creates an instance of the SynthesizeSpeechRequest.Builder
avoiding the need
to create one manually via SynthesizeSpeechRequest.builder()
synthesizeSpeechRequest
- A Consumer
that will call methods on SynthesizeSpeechInput.Builder
to create a request.destinationPath
- Path
to file that response contents will be written to. The file must not exist or this method
will throw an exception. If the file is not writable by the current user then an exception will be thrown.
The service documentation for the response content is as follows '
Stream containing the synthesized speech.
'.SynthesizeSpeech
API, the limit for input text is a maximum of 6000 characters total, of
which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask
API, the
maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not
counted as billed characters.Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.
OutputFormat
selected. Speech marks are only available for content in json
format.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.