Polly class
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.
Constructors
- Polly({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
deleteLexicon(
{required String name}) → Future< void> -
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
orListLexicon
APIs. -
describeVoices(
{Engine? engine, bool? includeAdditionalLanguageCodes, LanguageCode? languageCode, String? nextToken}) → Future< DescribeVoicesOutput> - 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.
-
getLexicon(
{required String name}) → Future< GetLexiconOutput> - Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
-
getSpeechSynthesisTask(
{required String taskId}) → Future< GetSpeechSynthesisTaskOutput> - 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.
-
listLexicons(
{String? nextToken}) → Future< ListLexiconsOutput> - Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
-
listSpeechSynthesisTasks(
{int? maxResults, String? nextToken, TaskStatus? status}) → Future< ListSpeechSynthesisTasksOutput> - 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.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putLexicon(
{required String content, required String name}) → Future< void> - 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.
-
startSpeechSynthesisTask(
{required OutputFormat outputFormat, required String outputS3BucketName, required String text, required VoiceId voiceId, Engine? engine, LanguageCode? languageCode, List< String> ? lexiconNames, String? outputS3KeyPrefix, String? sampleRate, String? snsTopicArn, List<SpeechMarkType> ? speechMarkTypes, TextType? textType}) → Future<StartSpeechSynthesisTaskOutput> -
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. -
synthesizeSpeech(
{required OutputFormat outputFormat, required String text, required VoiceId voiceId, Engine? engine, LanguageCode? languageCode, List< String> ? lexiconNames, String? sampleRate, List<SpeechMarkType> ? speechMarkTypes, TextType? textType}) → Future<SynthesizeSpeechOutput> - 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.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited