DescribeVoices - Amazon Polly
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

DescribeVoices

Returns the list of voices: the voices that Amazon Polly provides and the custom voices in your account. Each voice speaks a specified language and is identified by an ID. A voice that Amazon Polly provides is either male or female, and its ID 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, your news reader application reads news in a specific language, and you want to give users the option to choose the voice. With the DescribeVoices operation, you can provide a list of available voices for users to choose 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.

The list includes custom voices in every status. For each voice, Origin indicates whether Amazon Polly provides the voice or you created it. You can use a custom voice for synthesis only when its status is active. A voice in failed status stays in the list until you delete it.

For a custom voice, DescribeVoices returns Origin, Id, Name, Status, LanguageCode, LanguageName, SupportedEngines, and CreationTime. To get Arn, StatusReason, VoiceCreationData, and CustomerManagedEncryption, use GetVoice.

The LanguageCode and Engine filters apply to custom voices in the same way as to voices that Amazon Polly provides.

This operation requires permissions to perform the polly:DescribeVoices action.

Request Syntax

GET /v1/voices?Engine=Engine&IncludeAdditionalLanguageCodes=IncludeAdditionalLanguageCodes&LanguageCode=LanguageCode&NextToken=NextToken HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

Engine

Specifies the engine (standard, neural, long-form or generative) used by Amazon Polly when processing input text for speech synthesis.

Valid Values: standard | neural | long-form | generative

IncludeAdditionalLanguageCodes

Boolean value indicating whether to return any bilingual voices that use the specified language as an additional language. For instance, if you request all languages that use US English (es-US), and there is an Italian voice that speaks both Italian (it-IT) and US English, that voice will be included if you specify yes but not if you specify no.

LanguageCode

The language identification tag (ISO 639 code for the language name-ISO 3166 country code) for filtering the list of voices returned. If you don't specify this optional parameter, all available voices are returned.

Valid Values: arb | cmn-CN | cy-GB | da-DK | de-DE | en-AU | en-GB | en-GB-WLS | en-IN | en-US | es-ES | es-MX | es-US | fr-CA | fr-FR | is-IS | it-IT | ja-JP | hi-IN | ko-KR | nb-NO | nl-NL | pl-PL | pt-BR | pt-PT | ro-RO | ru-RU | sv-SE | tr-TR | en-NZ | en-ZA | ca-ES | de-AT | yue-CN | ar-AE | fi-FI | en-IE | nl-BE | fr-BE | cs-CZ | de-CH | en-SG

NextToken

An opaque pagination token returned from the previous DescribeVoices operation. If present, this indicates where to continue the listing.

Length Constraints: Minimum length of 0. Maximum length of 4096.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "NextToken": "string", "Voices": [ { "AdditionalLanguageCodes": [ "string" ], "Arn": "string", "CreationTime": number, "CustomerManagedEncryption": { "EncryptionContext": { "string" : "string" }, "KmsKeyArn": "string" }, "Gender": "string", "Id": "string", "LanguageCode": "string", "LanguageName": "string", "Name": "string", "Origin": "string", "Status": "string", "StatusReason": "string", "SupportedEngines": [ "string" ], "VoiceCreationData": { "Recordings": [ { "Data": { "Bytes": blob, "S3Url": "string" }, "Format": "string" } ] } } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

The pagination token to use in the next request to continue the listing of voices. NextToken is returned only if the response is truncated.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 4096.

Voices

A list of voices with their properties.

Type: Array of Voice objects

Errors

For information about the errors that are common to all actions, see Common Error Types.

InvalidNextTokenException

The NextToken is invalid. Verify that it's spelled correctly, and then try again.

HTTP Status Code: 400

ServiceFailureException

An unknown condition has caused a service failure.

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: