All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.polly.AmazonPollyAsync Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Polly module holds the client classes that are used for communicating with Amazon Polly.

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.polly;

import javax.annotation.Generated;

import com.amazonaws.services.polly.model.*;

/**
 * Interface for accessing Amazon Polly asynchronously. Each asynchronous method will return a Java Future object
 * representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
 * notification when an asynchronous operation completes.
 * 

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.polly.AbstractAmazonPollyAsync} instead. *

*

*

* 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. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonPollyAsync extends AmazonPolly { /** *

* Deletes the specified pronunciation lexicon stored in an Amazon Web Services 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. *

* * @param deleteLexiconRequest * @return A Java Future containing the result of the DeleteLexicon operation returned by the service. * @sample AmazonPollyAsync.DeleteLexicon * @see AWS API * Documentation */ java.util.concurrent.Future deleteLexiconAsync(DeleteLexiconRequest deleteLexiconRequest); /** *

* Deletes the specified pronunciation lexicon stored in an Amazon Web Services 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. *

* * @param deleteLexiconRequest * @param 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. * @return A Java Future containing the result of the DeleteLexicon operation returned by the service. * @sample AmazonPollyAsyncHandler.DeleteLexicon * @see AWS API * Documentation */ java.util.concurrent.Future deleteLexiconAsync(DeleteLexiconRequest deleteLexiconRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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. *

* * @param describeVoicesRequest * @return A Java Future containing the result of the DescribeVoices operation returned by the service. * @sample AmazonPollyAsync.DescribeVoices * @see AWS API * Documentation */ java.util.concurrent.Future describeVoicesAsync(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. *

* * @param describeVoicesRequest * @param 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. * @return A Java Future containing the result of the DescribeVoices operation returned by the service. * @sample AmazonPollyAsyncHandler.DescribeVoices * @see AWS API * Documentation */ java.util.concurrent.Future describeVoicesAsync(DescribeVoicesRequest describeVoicesRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Returns the content of the specified pronunciation lexicon stored in an Amazon Web Services Region. For more * information, see Managing * Lexicons. *

* * @param getLexiconRequest * @return A Java Future containing the result of the GetLexicon operation returned by the service. * @sample AmazonPollyAsync.GetLexicon * @see AWS API * Documentation */ java.util.concurrent.Future getLexiconAsync(GetLexiconRequest getLexiconRequest); /** *

* Returns the content of the specified pronunciation lexicon stored in an Amazon Web Services Region. For more * information, see Managing * Lexicons. *

* * @param getLexiconRequest * @param 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. * @return A Java Future containing the result of the GetLexicon operation returned by the service. * @sample AmazonPollyAsyncHandler.GetLexicon * @see AWS API * Documentation */ java.util.concurrent.Future getLexiconAsync(GetLexiconRequest getLexiconRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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. *

* * @param getSpeechSynthesisTaskRequest * @return A Java Future containing the result of the GetSpeechSynthesisTask operation returned by the service. * @sample AmazonPollyAsync.GetSpeechSynthesisTask * @see AWS * API Documentation */ java.util.concurrent.Future getSpeechSynthesisTaskAsync(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. *

* * @param getSpeechSynthesisTaskRequest * @param 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. * @return A Java Future containing the result of the GetSpeechSynthesisTask operation returned by the service. * @sample AmazonPollyAsyncHandler.GetSpeechSynthesisTask * @see AWS * API Documentation */ java.util.concurrent.Future getSpeechSynthesisTaskAsync(GetSpeechSynthesisTaskRequest getSpeechSynthesisTaskRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Returns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see Managing Lexicons. *

* * @param listLexiconsRequest * @return A Java Future containing the result of the ListLexicons operation returned by the service. * @sample AmazonPollyAsync.ListLexicons * @see AWS API * Documentation */ java.util.concurrent.Future listLexiconsAsync(ListLexiconsRequest listLexiconsRequest); /** *

* Returns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see Managing Lexicons. *

* * @param listLexiconsRequest * @param 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. * @return A Java Future containing the result of the ListLexicons operation returned by the service. * @sample AmazonPollyAsyncHandler.ListLexicons * @see AWS API * Documentation */ java.util.concurrent.Future listLexiconsAsync(ListLexiconsRequest listLexiconsRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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. *

* * @param listSpeechSynthesisTasksRequest * @return A Java Future containing the result of the ListSpeechSynthesisTasks operation returned by the service. * @sample AmazonPollyAsync.ListSpeechSynthesisTasks * @see AWS * API Documentation */ java.util.concurrent.Future listSpeechSynthesisTasksAsync(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. *

* * @param listSpeechSynthesisTasksRequest * @param 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. * @return A Java Future containing the result of the ListSpeechSynthesisTasks operation returned by the service. * @sample AmazonPollyAsyncHandler.ListSpeechSynthesisTasks * @see AWS * API Documentation */ java.util.concurrent.Future listSpeechSynthesisTasksAsync(ListSpeechSynthesisTasksRequest listSpeechSynthesisTasksRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Stores a pronunciation lexicon in an Amazon Web Services 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. *

* * @param putLexiconRequest * @return A Java Future containing the result of the PutLexicon operation returned by the service. * @sample AmazonPollyAsync.PutLexicon * @see AWS API * Documentation */ java.util.concurrent.Future putLexiconAsync(PutLexiconRequest putLexiconRequest); /** *

* Stores a pronunciation lexicon in an Amazon Web Services 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. *

* * @param putLexiconRequest * @param 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. * @return A Java Future containing the result of the PutLexicon operation returned by the service. * @sample AmazonPollyAsyncHandler.PutLexicon * @see AWS API * Documentation */ java.util.concurrent.Future putLexiconAsync(PutLexiconRequest putLexiconRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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. The SpeechSynthesisTask object is available for 72 hours after starting the * asynchronous synthesis task. *

* * @param startSpeechSynthesisTaskRequest * @return A Java Future containing the result of the StartSpeechSynthesisTask operation returned by the service. * @sample AmazonPollyAsync.StartSpeechSynthesisTask * @see AWS * API Documentation */ java.util.concurrent.Future startSpeechSynthesisTaskAsync(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. The SpeechSynthesisTask object is available for 72 hours after starting the * asynchronous synthesis task. *

* * @param startSpeechSynthesisTaskRequest * @param 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. * @return A Java Future containing the result of the StartSpeechSynthesisTask operation returned by the service. * @sample AmazonPollyAsyncHandler.StartSpeechSynthesisTask * @see AWS * API Documentation */ java.util.concurrent.Future startSpeechSynthesisTaskAsync(StartSpeechSynthesisTaskRequest startSpeechSynthesisTaskRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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. *

* * @param synthesizeSpeechRequest * @return A Java Future containing the result of the SynthesizeSpeech operation returned by the service. * @sample AmazonPollyAsync.SynthesizeSpeech * @see AWS API * Documentation */ java.util.concurrent.Future synthesizeSpeechAsync(SynthesizeSpeechRequest synthesizeSpeechRequest); /** *

* 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. *

* * @param synthesizeSpeechRequest * @param 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. * @return A Java Future containing the result of the SynthesizeSpeech operation returned by the service. * @sample AmazonPollyAsyncHandler.SynthesizeSpeech * @see AWS API * Documentation */ java.util.concurrent.Future synthesizeSpeechAsync(SynthesizeSpeechRequest synthesizeSpeechRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy