

# Actions
<a name="API_Operations"></a>

The following actions are supported:
+  [DeleteLexicon](API_DeleteLexicon.md) 
+  [DescribeVoices](API_DescribeVoices.md) 
+  [GetLexicon](API_GetLexicon.md) 
+  [GetSpeechSynthesisTask](API_GetSpeechSynthesisTask.md) 
+  [ListLexicons](API_ListLexicons.md) 
+  [ListSpeechSynthesisTasks](API_ListSpeechSynthesisTasks.md) 
+  [PutLexicon](API_PutLexicon.md) 
+  [StartSpeechSynthesisStream](API_StartSpeechSynthesisStream.md) 
+  [StartSpeechSynthesisTask](API_StartSpeechSynthesisTask.md) 
+  [SynthesizeSpeech](API_SynthesizeSpeech.md) 

# DeleteLexicon
<a name="API_DeleteLexicon"></a>

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](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html).

## Request Syntax
<a name="API_DeleteLexicon_RequestSyntax"></a>

```
DELETE /v1/lexicons/LexiconName HTTP/1.1
```

## URI Request Parameters
<a name="API_DeleteLexicon_RequestParameters"></a>

The request uses the following URI parameters.

 ** [LexiconName](#API_DeleteLexicon_RequestSyntax) **   <a name="polly-DeleteLexicon-request-uri-Name"></a>
The name of the lexicon to delete. Must be an existing lexicon in the region.  
Pattern: `[0-9A-Za-z]{1,20}`   
Required: Yes

## Request Body
<a name="API_DeleteLexicon_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_DeleteLexicon_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_DeleteLexicon_ResponseElements"></a>

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

## Errors
<a name="API_DeleteLexicon_Errors"></a>

 ** LexiconNotFoundException **   
Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region.  
Verify that the lexicon exists, is in the region (see [ListLexicons](API_ListLexicons.md)) and that you spelled its name is spelled correctly. Then try again.  
HTTP Status Code: 404

 ** ServiceFailureException **   
An unknown condition has caused a service failure.  
HTTP Status Code: 500

## See Also
<a name="API_DeleteLexicon_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/DeleteLexicon) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/DeleteLexicon) 

# DescribeVoices
<a name="API_DescribeVoices"></a>

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.

## Request Syntax
<a name="API_DescribeVoices_RequestSyntax"></a>

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

## URI Request Parameters
<a name="API_DescribeVoices_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Engine](#API_DescribeVoices_RequestSyntax) **   <a name="polly-DescribeVoices-request-uri-Engine"></a>
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](#API_DescribeVoices_RequestSyntax) **   <a name="polly-DescribeVoices-request-uri-IncludeAdditionalLanguageCodes"></a>
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](#API_DescribeVoices_RequestSyntax) **   <a name="polly-DescribeVoices-request-uri-LanguageCode"></a>
 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](#API_DescribeVoices_RequestSyntax) **   <a name="polly-DescribeVoices-request-uri-NextToken"></a>
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
<a name="API_DescribeVoices_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_DescribeVoices_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "NextToken": "string",
   "Voices": [ 
      { 
         "AdditionalLanguageCodes": [ "string" ],
         "Gender": "string",
         "Id": "string",
         "LanguageCode": "string",
         "LanguageName": "string",
         "Name": "string",
         "SupportedEngines": [ "string" ]
      }
   ]
}
```

## Response Elements
<a name="API_DescribeVoices_ResponseElements"></a>

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](#API_DescribeVoices_ResponseSyntax) **   <a name="polly-DescribeVoices-response-NextToken"></a>
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](#API_DescribeVoices_ResponseSyntax) **   <a name="polly-DescribeVoices-response-Voices"></a>
A list of voices with their properties.  
Type: Array of [Voice](API_Voice.md) objects

## Errors
<a name="API_DescribeVoices_Errors"></a>

 ** 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
<a name="API_DescribeVoices_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/DescribeVoices) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/DescribeVoices) 

# GetLexicon
<a name="API_GetLexicon"></a>

Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see [Managing Lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html).

## Request Syntax
<a name="API_GetLexicon_RequestSyntax"></a>

```
GET /v1/lexicons/LexiconName HTTP/1.1
```

## URI Request Parameters
<a name="API_GetLexicon_RequestParameters"></a>

The request uses the following URI parameters.

 ** [LexiconName](#API_GetLexicon_RequestSyntax) **   <a name="polly-GetLexicon-request-uri-Name"></a>
Name of the lexicon.  
Pattern: `[0-9A-Za-z]{1,20}`   
Required: Yes

## Request Body
<a name="API_GetLexicon_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_GetLexicon_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Lexicon": { 
      "Content": "string",
      "Name": "string"
   },
   "LexiconAttributes": { 
      "Alphabet": "string",
      "LanguageCode": "string",
      "LastModified": number,
      "LexemesCount": number,
      "LexiconArn": "string",
      "Size": number
   }
}
```

## Response Elements
<a name="API_GetLexicon_ResponseElements"></a>

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

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

 ** [Lexicon](#API_GetLexicon_ResponseSyntax) **   <a name="polly-GetLexicon-response-Lexicon"></a>
Lexicon object that provides name and the string content of the lexicon.   
Type: [Lexicon](API_Lexicon.md) object

 ** [LexiconAttributes](#API_GetLexicon_ResponseSyntax) **   <a name="polly-GetLexicon-response-LexiconAttributes"></a>
Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.  
Type: [LexiconAttributes](API_LexiconAttributes.md) object

## Errors
<a name="API_GetLexicon_Errors"></a>

 ** LexiconNotFoundException **   
Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region.  
Verify that the lexicon exists, is in the region (see [ListLexicons](API_ListLexicons.md)) and that you spelled its name is spelled correctly. Then try again.  
HTTP Status Code: 404

 ** ServiceFailureException **   
An unknown condition has caused a service failure.  
HTTP Status Code: 500

## See Also
<a name="API_GetLexicon_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/GetLexicon) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/GetLexicon) 

# GetSpeechSynthesisTask
<a name="API_GetSpeechSynthesisTask"></a>

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.

## Request Syntax
<a name="API_GetSpeechSynthesisTask_RequestSyntax"></a>

```
GET /v1/synthesisTasks/TaskId HTTP/1.1
```

## URI Request Parameters
<a name="API_GetSpeechSynthesisTask_RequestParameters"></a>

The request uses the following URI parameters.

 ** [TaskId](#API_GetSpeechSynthesisTask_RequestSyntax) **   <a name="polly-GetSpeechSynthesisTask-request-uri-TaskId"></a>
The Amazon Polly generated identifier for a speech synthesis task.  
Pattern: `^[a-zA-Z0-9_-]{1,100}$`   
Required: Yes

## Request Body
<a name="API_GetSpeechSynthesisTask_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_GetSpeechSynthesisTask_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "SynthesisTask": { 
      "CreationTime": number,
      "Engine": "string",
      "LanguageCode": "string",
      "LexiconNames": [ "string" ],
      "OutputFormat": "string",
      "OutputUri": "string",
      "RequestCharacters": number,
      "SampleRate": "string",
      "SnsTopicArn": "string",
      "SpeechMarkTypes": [ "string" ],
      "TaskId": "string",
      "TaskStatus": "string",
      "TaskStatusReason": "string",
      "TextType": "string",
      "VoiceId": "string"
   }
}
```

## Response Elements
<a name="API_GetSpeechSynthesisTask_ResponseElements"></a>

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

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

 ** [SynthesisTask](#API_GetSpeechSynthesisTask_ResponseSyntax) **   <a name="polly-GetSpeechSynthesisTask-response-SynthesisTask"></a>
SynthesisTask object that provides information from the requested task, including output format, creation time, task status, and so on.  
Type: [SynthesisTask](API_SynthesisTask.md) object

## Errors
<a name="API_GetSpeechSynthesisTask_Errors"></a>

 ** InvalidTaskIdException **   
The provided Task ID is not valid. Please provide a valid Task ID and try again.  
HTTP Status Code: 400

 ** ServiceFailureException **   
An unknown condition has caused a service failure.  
HTTP Status Code: 500

 ** SynthesisTaskNotFoundException **   
The Speech Synthesis task with requested Task ID cannot be found.  
HTTP Status Code: 400

## See Also
<a name="API_GetSpeechSynthesisTask_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/GetSpeechSynthesisTask) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/GetSpeechSynthesisTask) 

# ListLexicons
<a name="API_ListLexicons"></a>

Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see [Managing Lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html).

## Request Syntax
<a name="API_ListLexicons_RequestSyntax"></a>

```
GET /v1/lexicons?NextToken=NextToken HTTP/1.1
```

## URI Request Parameters
<a name="API_ListLexicons_RequestParameters"></a>

The request uses the following URI parameters.

 ** [NextToken](#API_ListLexicons_RequestSyntax) **   <a name="polly-ListLexicons-request-uri-NextToken"></a>
An opaque pagination token returned from previous `ListLexicons` operation. If present, indicates where to continue the list of lexicons.  
Length Constraints: Minimum length of 0. Maximum length of 4096.

## Request Body
<a name="API_ListLexicons_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_ListLexicons_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Lexicons": [ 
      { 
         "Attributes": { 
            "Alphabet": "string",
            "LanguageCode": "string",
            "LastModified": number,
            "LexemesCount": number,
            "LexiconArn": "string",
            "Size": number
         },
         "Name": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListLexicons_ResponseElements"></a>

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

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

 ** [Lexicons](#API_ListLexicons_ResponseSyntax) **   <a name="polly-ListLexicons-response-Lexicons"></a>
A list of lexicon names and attributes.  
Type: Array of [LexiconDescription](API_LexiconDescription.md) objects

 ** [NextToken](#API_ListLexicons_ResponseSyntax) **   <a name="polly-ListLexicons-response-NextToken"></a>
The pagination token to use in the next request to continue the listing of lexicons. `NextToken` is returned only if the response is truncated.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 4096.

## Errors
<a name="API_ListLexicons_Errors"></a>

 ** 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
<a name="API_ListLexicons_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/ListLexicons) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/ListLexicons) 

# ListSpeechSynthesisTasks
<a name="API_ListSpeechSynthesisTasks"></a>

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.

## Request Syntax
<a name="API_ListSpeechSynthesisTasks_RequestSyntax"></a>

```
GET /v1/synthesisTasks?MaxResults=MaxResults&NextToken=NextToken&Status=Status HTTP/1.1
```

## URI Request Parameters
<a name="API_ListSpeechSynthesisTasks_RequestParameters"></a>

The request uses the following URI parameters.

 ** [MaxResults](#API_ListSpeechSynthesisTasks_RequestSyntax) **   <a name="polly-ListSpeechSynthesisTasks-request-uri-MaxResults"></a>
Maximum number of speech synthesis tasks returned in a List operation.  
Valid Range: Minimum value of 1. Maximum value of 100.

 ** [NextToken](#API_ListSpeechSynthesisTasks_RequestSyntax) **   <a name="polly-ListSpeechSynthesisTasks-request-uri-NextToken"></a>
The pagination token to use in the next request to continue the listing of speech synthesis tasks.   
Length Constraints: Minimum length of 0. Maximum length of 4096.

 ** [Status](#API_ListSpeechSynthesisTasks_RequestSyntax) **   <a name="polly-ListSpeechSynthesisTasks-request-uri-Status"></a>
Status of the speech synthesis tasks returned in a List operation  
Valid Values: `scheduled | inProgress | completed | failed` 

## Request Body
<a name="API_ListSpeechSynthesisTasks_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_ListSpeechSynthesisTasks_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "NextToken": "string",
   "SynthesisTasks": [ 
      { 
         "CreationTime": number,
         "Engine": "string",
         "LanguageCode": "string",
         "LexiconNames": [ "string" ],
         "OutputFormat": "string",
         "OutputUri": "string",
         "RequestCharacters": number,
         "SampleRate": "string",
         "SnsTopicArn": "string",
         "SpeechMarkTypes": [ "string" ],
         "TaskId": "string",
         "TaskStatus": "string",
         "TaskStatusReason": "string",
         "TextType": "string",
         "VoiceId": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListSpeechSynthesisTasks_ResponseElements"></a>

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](#API_ListSpeechSynthesisTasks_ResponseSyntax) **   <a name="polly-ListSpeechSynthesisTasks-response-NextToken"></a>
An opaque pagination token returned from the previous List operation in this request. If present, this indicates where to continue the listing.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 4096.

 ** [SynthesisTasks](#API_ListSpeechSynthesisTasks_ResponseSyntax) **   <a name="polly-ListSpeechSynthesisTasks-response-SynthesisTasks"></a>
List of SynthesisTask objects that provides information from the specified task in the list request, including output format, creation time, task status, and so on.  
Type: Array of [SynthesisTask](API_SynthesisTask.md) objects

## Errors
<a name="API_ListSpeechSynthesisTasks_Errors"></a>

 ** 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
<a name="API_ListSpeechSynthesisTasks_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/ListSpeechSynthesisTasks) 

# PutLexicon
<a name="API_PutLexicon"></a>

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](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html).

## Request Syntax
<a name="API_PutLexicon_RequestSyntax"></a>

```
PUT /v1/lexicons/LexiconName HTTP/1.1
Content-type: application/json

{
   "Content": "string"
}
```

## URI Request Parameters
<a name="API_PutLexicon_RequestParameters"></a>

The request uses the following URI parameters.

 ** [LexiconName](#API_PutLexicon_RequestSyntax) **   <a name="polly-PutLexicon-request-uri-Name"></a>
Name of the lexicon. The name must follow the regular express format [0-9A-Za-z]\$11,20\$1. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.   
Pattern: `[0-9A-Za-z]{1,20}`   
Required: Yes

## Request Body
<a name="API_PutLexicon_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [Content](#API_PutLexicon_RequestSyntax) **   <a name="polly-PutLexicon-request-Content"></a>
Content of the PLS lexicon as string data.  
Type: String  
Required: Yes

## Response Syntax
<a name="API_PutLexicon_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_PutLexicon_ResponseElements"></a>

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

## Errors
<a name="API_PutLexicon_Errors"></a>

 ** InvalidLexiconException **   
Amazon Polly can't find the specified lexicon. Verify that the lexicon's name is spelled correctly, and then try again.  
HTTP Status Code: 400

 ** LexiconSizeExceededException **   
The maximum size of the specified lexicon would be exceeded by this operation.  
HTTP Status Code: 400

 ** MaxLexemeLengthExceededException **   
The maximum size of the lexeme would be exceeded by this operation.  
HTTP Status Code: 400

 ** MaxLexiconsNumberExceededException **   
The maximum number of lexicons would be exceeded by this operation.  
HTTP Status Code: 400

 ** ServiceFailureException **   
An unknown condition has caused a service failure.  
HTTP Status Code: 500

 ** UnsupportedPlsAlphabetException **   
The alphabet specified by the lexicon is not a supported alphabet. Valid values are `x-sampa` and `ipa`.  
HTTP Status Code: 400

 ** UnsupportedPlsLanguageException **   
The language specified in the lexicon is unsupported. For a list of supported languages, see [Lexicon Attributes](https://docs.aws.amazon.com/polly/latest/dg/API_LexiconAttributes.html).  
HTTP Status Code: 400

## See Also
<a name="API_PutLexicon_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/PutLexicon) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/PutLexicon) 

# StartSpeechSynthesisStream
<a name="API_StartSpeechSynthesisStream"></a>

Synthesizes UTF-8 input, plain text, or SSML over a bidirectional streaming connection. Specify synthesis parameters in HTTP/2 headers, send text incrementally as events on the input stream, and receive synthesized audio as it becomes available.

This operation serves as a bidirectional counterpart to `SynthesizeSpeech`:
+  [SynthesizeSpeech](https://docs.aws.amazon.com/polly/latest/dg/API_SynthesizeSpeech.html) 

## Request Syntax
<a name="API_StartSpeechSynthesisStream_RequestSyntax"></a>

```
POST /v1/synthesisStream HTTP/1.1
x-amzn-Engine: Engine
x-amzn-LanguageCode: LanguageCode
x-amzn-LexiconNames: LexiconNames
x-amzn-OutputFormat: OutputFormat
x-amzn-SampleRate: SampleRate
x-amzn-VoiceId: VoiceId
Content-type: application/json

{
   "CloseStreamEvent": { 
   },
   "TextEvent": { 
      "FlushStreamConfiguration": { 
         "Force": boolean
      },
      "Text": "string",
      "TextType": "string"
   }
}
```

## URI Request Parameters
<a name="API_StartSpeechSynthesisStream_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Engine](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-Engine"></a>
Specifies the engine for Amazon Polly to use when processing input text for speech synthesis. Currently, only the `generative` engine is supported. If you specify a voice that the selected engine doesn't support, Amazon Polly returns an error.  
Valid Values: `standard | neural | long-form | generative`   
Required: Yes

 ** [LanguageCode](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-LanguageCode"></a>
An optional parameter that sets the language code for the speech synthesis request. Specify this parameter only when using a bilingual voice. If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the bilingual voice.  
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` 

 ** [LexiconNames](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-LexiconNames"></a>
The names of one or more pronunciation lexicons for the service to apply during synthesis. Amazon Polly applies lexicons only when the lexicon language matches the voice language.  
Array Members: Maximum number of 5 items.  
Pattern: `[0-9A-Za-z]{1,20}` 

 ** [OutputFormat](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-OutputFormat"></a>
The audio format for the synthesized speech. Currently, Amazon Polly does not support JSON speech marks.  
Valid Values: `json | mp3 | ogg_opus | ogg_vorbis | pcm | mulaw | alaw`   
Required: Yes

 ** [SampleRate](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-SampleRate"></a>
The audio frequency, specified in Hz.

 ** [VoiceId](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-VoiceId"></a>
The voice to use in synthesis. To get a list of available voice IDs, use the [DescribeVoices](https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) operation.  
Valid Values: `Aditi | Amy | Astrid | Bianca | Brian | Camila | Carla | Carmen | Celine | Chantal | Conchita | Cristiano | Dora | Emma | Enrique | Ewa | Filiz | Gabrielle | Geraint | Giorgio | Gwyneth | Hans | Ines | Ivy | Jacek | Jan | Joanna | Joey | Justin | Karl | Kendra | Kevin | Kimberly | Lea | Liv | Lotte | Lucia | Lupe | Mads | Maja | Marlene | Mathieu | Matthew | Maxim | Mia | Miguel | Mizuki | Naja | Nicole | Olivia | Penelope | Raveena | Ricardo | Ruben | Russell | Salli | Seoyeon | Takumi | Tatyana | Vicki | Vitoria | Zeina | Zhiyu | Aria | Ayanda | Arlet | Hannah | Arthur | Daniel | Liam | Pedro | Kajal | Hiujin | Laura | Elin | Ida | Suvi | Ola | Hala | Andres | Sergio | Remi | Adriano | Thiago | Ruth | Stephen | Kazuha | Tomoko | Niamh | Sofie | Lisa | Isabelle | Zayd | Danielle | Gregory | Burcu | Jitka | Sabrina | Jasmine | Jihye | Ambre | Beatrice | Florian | Lennart | Lorenzo | Tiffany`   
Required: Yes

## Request Body
<a name="API_StartSpeechSynthesisStream_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [CloseStreamEvent](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-CloseStreamEvent"></a>
An event indicating the end of the input stream.  
Type: [CloseStreamEvent](API_CloseStreamEvent.md) object  
Required: No

 ** [TextEvent](#API_StartSpeechSynthesisStream_RequestSyntax) **   <a name="polly-StartSpeechSynthesisStream-request-TextEvent"></a>
A text event containing content to be synthesized.  
Type: [TextEvent](API_TextEvent.md) object  
Required: No

## Response Syntax
<a name="API_StartSpeechSynthesisStream_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "AudioEvent": { 
      "AudioChunk": blob
   },
   "ServiceFailureException": { 
   },
   "ServiceQuotaExceededException": { 
   },
   "StreamClosedEvent": { 
      "RequestCharacters": number
   },
   "ThrottlingException": { 
   },
   "ValidationException": { 
   }
}
```

## Response Elements
<a name="API_StartSpeechSynthesisStream_ResponseElements"></a>

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

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

 ** [AudioEvent](#API_StartSpeechSynthesisStream_ResponseSyntax) **   <a name="polly-StartSpeechSynthesisStream-response-AudioEvent"></a>
An audio event containing synthesized speech.  
Type: [AudioEvent](API_AudioEvent.md) object

 ** [ServiceFailureException](#API_StartSpeechSynthesisStream_ResponseSyntax) **   <a name="polly-StartSpeechSynthesisStream-response-ServiceFailureException"></a>
An unknown condition has caused a service failure.  
Type: Exception  
HTTP Status Code: 500

 ** [ServiceQuotaExceededException](#API_StartSpeechSynthesisStream_ResponseSyntax) **   <a name="polly-StartSpeechSynthesisStream-response-ServiceQuotaExceededException"></a>
An exception indicating a service quota would be exceeded.  
Type: Exception  
HTTP Status Code: 402

 ** [StreamClosedEvent](#API_StartSpeechSynthesisStream_ResponseSyntax) **   <a name="polly-StartSpeechSynthesisStream-response-StreamClosedEvent"></a>
An event, with summary information, indicating the stream has closed.  
Type: [StreamClosedEvent](API_StreamClosedEvent.md) object

 ** [ThrottlingException](#API_StartSpeechSynthesisStream_ResponseSyntax) **   <a name="polly-StartSpeechSynthesisStream-response-ThrottlingException"></a>
An exception indicating the request was throttled.  
Type: Exception  
HTTP Status Code: 400

 ** [ValidationException](#API_StartSpeechSynthesisStream_ResponseSyntax) **   <a name="polly-StartSpeechSynthesisStream-response-ValidationException"></a>
An exception indicating the input failed validation.  
Type: Exception  
HTTP Status Code: 400

## Errors
<a name="API_StartSpeechSynthesisStream_Errors"></a>

 ** ServiceFailureException **   
An unknown condition has caused a service failure.  
HTTP Status Code: 500

 ** ServiceQuotaExceededException **   
The request would cause a service quota to be exceeded.    
 ** quotaCode **   
The quota code identifying the specific quota.  
 ** serviceCode **   
The service code identifying the originating service.
HTTP Status Code: 402

 ** ThrottlingException **   
The request was denied because of request throttling.    
 ** throttlingReasons **   
A list of reasons explaining why the request was throttled.
HTTP Status Code: 400

 ** ValidationException **   
The input fails to satisfy the constraints specified by the service.    
 ** fields **   
The fields that caused the validation error.  
 ** reason **   
The reason the request failed validation.
HTTP Status Code: 400

## See Also
<a name="API_StartSpeechSynthesisStream_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/StartSpeechSynthesisStream) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/StartSpeechSynthesisStream) 

# StartSpeechSynthesisTask
<a name="API_StartSpeechSynthesisTask"></a>

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.

## Request Syntax
<a name="API_StartSpeechSynthesisTask_RequestSyntax"></a>

```
POST /v1/synthesisTasks HTTP/1.1
Content-type: application/json

{
   "Engine": "string",
   "LanguageCode": "string",
   "LexiconNames": [ "string" ],
   "OutputFormat": "string",
   "OutputS3BucketName": "string",
   "OutputS3KeyPrefix": "string",
   "SampleRate": "string",
   "SnsTopicArn": "string",
   "SpeechMarkTypes": [ "string" ],
   "Text": "string",
   "TextType": "string",
   "VoiceId": "string"
}
```

## URI Request Parameters
<a name="API_StartSpeechSynthesisTask_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_StartSpeechSynthesisTask_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [Engine](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-Engine"></a>
Specifies the engine (`standard`, `neural`, `long-form` or `generative`) for Amazon Polly to use when processing input text for speech synthesis. Using a voice that is not supported for the engine selected will result in an error.  
Type: String  
Valid Values: `standard | neural | long-form | generative`   
Required: No

 ** [LanguageCode](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-LanguageCode"></a>
Optional language code for the Speech Synthesis request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).   
If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the bilingual voice. The default language for any voice is the one returned by the [DescribeVoices](https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) operation for the `LanguageCode` parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.  
Type: String  
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`   
Required: No

 ** [LexiconNames](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-LexiconNames"></a>
List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice.   
Type: Array of strings  
Array Members: Maximum number of 5 items.  
Pattern: `[0-9A-Za-z]{1,20}`   
Required: No

 ** [OutputFormat](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-OutputFormat"></a>
The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg\$1vorbis, ogg\$1opus, mu-law, a-law, or pcm. For speech marks, this will be json.   
Type: String  
Valid Values: `json | mp3 | ogg_opus | ogg_vorbis | pcm | mulaw | alaw`   
Required: Yes

 ** [OutputS3BucketName](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-OutputS3BucketName"></a>
Amazon S3 bucket name to which the output file will be saved.  
Type: String  
Pattern: `^[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9]$`   
Required: Yes

 ** [OutputS3KeyPrefix](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-OutputS3KeyPrefix"></a>
The Amazon S3 key prefix for the output speech file.  
Type: String  
Pattern: `^[0-9a-zA-Z\/\!\-_\.\*\'\(\):;\$@=+\,\?&]{0,800}$`   
Required: No

 ** [SampleRate](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-SampleRate"></a>
The audio frequency specified in Hz.  
The valid values for mp3 and ogg\$1vorbis are "8000", "16000", "22050", and "24000". The default value for standard voices is "22050". The default value for neural voices is "24000". The default value for long-form voices is "24000". The default value for generative voices is "24000".  
Valid values for pcm are "8000" and "16000" The default value is "16000".   
Valid value for ogg\$1opus is "48000".   
Valid value for mu-law and a-law is "8000".   
Type: String  
Required: No

 ** [SnsTopicArn](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-SnsTopicArn"></a>
ARN for the SNS topic optionally used for providing status notification for a speech synthesis task.  
Type: String  
Pattern: `^arn:aws(-(cn|iso(-b)?|us-gov))?:sns:[a-z0-9_-]{1,50}:\d{12}:[a-zA-Z0-9_-]{1,251}([a-zA-Z0-9_-]{0,5}|\.fifo)$`   
Required: No

 ** [SpeechMarkTypes](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-SpeechMarkTypes"></a>
The type of speech marks returned for the input text.  
Type: Array of strings  
Array Members: Maximum number of 4 items.  
Valid Values: `sentence | ssml | viseme | word`   
Required: No

 ** [Text](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-Text"></a>
The input text to synthesize. If you specify ssml as the TextType, follow the SSML format for the input text.   
Type: String  
Required: Yes

 ** [TextType](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-TextType"></a>
Specifies whether the input text is plain text or SSML. The default value is plain text.   
Type: String  
Valid Values: `ssml | text`   
Required: No

 ** [VoiceId](#API_StartSpeechSynthesisTask_RequestSyntax) **   <a name="polly-StartSpeechSynthesisTask-request-VoiceId"></a>
Voice ID to use for the synthesis.   
Type: String  
Valid Values: `Aditi | Amy | Astrid | Bianca | Brian | Camila | Carla | Carmen | Celine | Chantal | Conchita | Cristiano | Dora | Emma | Enrique | Ewa | Filiz | Gabrielle | Geraint | Giorgio | Gwyneth | Hans | Ines | Ivy | Jacek | Jan | Joanna | Joey | Justin | Karl | Kendra | Kevin | Kimberly | Lea | Liv | Lotte | Lucia | Lupe | Mads | Maja | Marlene | Mathieu | Matthew | Maxim | Mia | Miguel | Mizuki | Naja | Nicole | Olivia | Penelope | Raveena | Ricardo | Ruben | Russell | Salli | Seoyeon | Takumi | Tatyana | Vicki | Vitoria | Zeina | Zhiyu | Aria | Ayanda | Arlet | Hannah | Arthur | Daniel | Liam | Pedro | Kajal | Hiujin | Laura | Elin | Ida | Suvi | Ola | Hala | Andres | Sergio | Remi | Adriano | Thiago | Ruth | Stephen | Kazuha | Tomoko | Niamh | Sofie | Lisa | Isabelle | Zayd | Danielle | Gregory | Burcu | Jitka | Sabrina | Jasmine | Jihye | Ambre | Beatrice | Florian | Lennart | Lorenzo | Tiffany`   
Required: Yes

## Response Syntax
<a name="API_StartSpeechSynthesisTask_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "SynthesisTask": { 
      "CreationTime": number,
      "Engine": "string",
      "LanguageCode": "string",
      "LexiconNames": [ "string" ],
      "OutputFormat": "string",
      "OutputUri": "string",
      "RequestCharacters": number,
      "SampleRate": "string",
      "SnsTopicArn": "string",
      "SpeechMarkTypes": [ "string" ],
      "TaskId": "string",
      "TaskStatus": "string",
      "TaskStatusReason": "string",
      "TextType": "string",
      "VoiceId": "string"
   }
}
```

## Response Elements
<a name="API_StartSpeechSynthesisTask_ResponseElements"></a>

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

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

 ** [SynthesisTask](#API_StartSpeechSynthesisTask_ResponseSyntax) **   <a name="polly-StartSpeechSynthesisTask-response-SynthesisTask"></a>
SynthesisTask object that provides information and attributes about a newly submitted speech synthesis task.  
Type: [SynthesisTask](API_SynthesisTask.md) object

## Errors
<a name="API_StartSpeechSynthesisTask_Errors"></a>

 ** EngineNotSupportedException **   
This engine is not compatible with the voice that you have designated. Choose a new voice that is compatible with the engine or change the engine and restart the operation.  
HTTP Status Code: 400

 ** InvalidS3BucketException **   
The provided Amazon S3 bucket name is invalid. Please check your input with S3 bucket naming requirements and try again.  
HTTP Status Code: 400

 ** InvalidS3KeyException **   
The provided Amazon S3 key prefix is invalid. Please provide a valid S3 object key name.  
HTTP Status Code: 400

 ** InvalidSampleRateException **   
The specified sample rate is not valid.  
HTTP Status Code: 400

 ** InvalidSnsTopicArnException **   
The provided SNS topic ARN is invalid. Please provide a valid SNS topic ARN and try again.  
HTTP Status Code: 400

 ** InvalidSsmlException **   
The SSML you provided is invalid. Verify the SSML syntax, spelling of tags and values, and then try again.  
HTTP Status Code: 400

 ** LanguageNotSupportedException **   
The language specified is not currently supported by Amazon Polly in this capacity.  
HTTP Status Code: 400

 ** LexiconNotFoundException **   
Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region.  
Verify that the lexicon exists, is in the region (see [ListLexicons](API_ListLexicons.md)) and that you spelled its name is spelled correctly. Then try again.  
HTTP Status Code: 404

 ** MarksNotSupportedForFormatException **   
Speech marks are not supported for the `OutputFormat` selected. Speech marks are only available for content in `json` format.  
HTTP Status Code: 400

 ** ServiceFailureException **   
An unknown condition has caused a service failure.  
HTTP Status Code: 500

 ** SsmlMarksNotSupportedForTextTypeException **   
SSML speech marks are not supported for plain text-type input.  
HTTP Status Code: 400

 ** TextLengthExceededException **   
The value of the "Text" parameter is longer than the accepted limits. For the `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.  
HTTP Status Code: 400

## See Also
<a name="API_StartSpeechSynthesisTask_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/StartSpeechSynthesisTask) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/StartSpeechSynthesisTask) 

# SynthesizeSpeech
<a name="API_SynthesizeSpeech"></a>

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](https://docs.aws.amazon.com/polly/latest/dg/how-text-to-speech-works.html).

## Request Syntax
<a name="API_SynthesizeSpeech_RequestSyntax"></a>

```
POST /v1/speech HTTP/1.1
Content-type: application/json

{
   "Engine": "string",
   "LanguageCode": "string",
   "LexiconNames": [ "string" ],
   "OutputFormat": "string",
   "SampleRate": "string",
   "SpeechMarkTypes": [ "string" ],
   "Text": "string",
   "TextType": "string",
   "VoiceId": "string"
}
```

## URI Request Parameters
<a name="API_SynthesizeSpeech_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_SynthesizeSpeech_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [Engine](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-Engine"></a>
Specifies the engine (`standard`, `neural`, `long-form`, or `generative`) for Amazon Polly to use when processing input text for speech synthesis. Provide an engine that is supported by the voice you select. If you don't provide an engine, the standard engine is selected by default. If a chosen voice isn't supported by the standard engine, this will result in an error. For information on Amazon Polly voices and which voices are available for each engine, see [Available Voices](https://docs.aws.amazon.com/polly/latest/dg/voicelist.html).  
Type: String  
Valid Values: `standard | neural | long-form | generative`   
Required: No

 ** [LanguageCode](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-LanguageCode"></a>
Optional language code for the Synthesize Speech request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).   
If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the bilingual voice. The default language for any voice is the one returned by the [DescribeVoices](https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) operation for the `LanguageCode` parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.  
Type: String  
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`   
Required: No

 ** [LexiconNames](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-LexiconNames"></a>
List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. For information about storing lexicons, see [PutLexicon](https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html).  
Type: Array of strings  
Array Members: Maximum number of 5 items.  
Pattern: `[0-9A-Za-z]{1,20}`   
Required: No

 ** [OutputFormat](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-OutputFormat"></a>
 The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg\$1vorbis, ogg\$1opus, mu-law, a-law or pcm. For speech marks, this will be json.   
When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.   
Type: String  
Valid Values: `json | mp3 | ogg_opus | ogg_vorbis | pcm | mulaw | alaw`   
Required: Yes

 ** [SampleRate](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-SampleRate"></a>
The audio frequency specified in Hz.  
The valid values for mp3 and ogg\$1vorbis are "8000", "16000", "22050", "24000", "44100" and "48000". The default value for standard voices is "22050". The default value for neural voices is "24000". The default value for long-form voices is "24000". The default value for generative voices is "24000".  
Valid values for pcm are "8000" and "16000" The default value is "16000".   
Valid value for ogg\$1opus is "48000".   
Valid value for mu-law and a-law is "8000".   
Type: String  
Required: No

 ** [SpeechMarkTypes](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-SpeechMarkTypes"></a>
The type of speech marks returned for the input text.  
Type: Array of strings  
Array Members: Maximum number of 4 items.  
Valid Values: `sentence | ssml | viseme | word`   
Required: No

 ** [Text](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-Text"></a>
 Input text to synthesize. If you specify `ssml` as the `TextType`, follow the SSML format for the input text.   
Type: String  
Required: Yes

 ** [TextType](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-TextType"></a>
 Specifies whether the input text is plain text or SSML. The default value is plain text. For more information, see [Using SSML](https://docs.aws.amazon.com/polly/latest/dg/ssml.html).  
Type: String  
Valid Values: `ssml | text`   
Required: No

 ** [VoiceId](#API_SynthesizeSpeech_RequestSyntax) **   <a name="polly-SynthesizeSpeech-request-VoiceId"></a>
 Voice ID to use for the synthesis. You can get a list of available voice IDs by calling the [DescribeVoices](https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) operation.   
Type: String  
Valid Values: `Aditi | Amy | Astrid | Bianca | Brian | Camila | Carla | Carmen | Celine | Chantal | Conchita | Cristiano | Dora | Emma | Enrique | Ewa | Filiz | Gabrielle | Geraint | Giorgio | Gwyneth | Hans | Ines | Ivy | Jacek | Jan | Joanna | Joey | Justin | Karl | Kendra | Kevin | Kimberly | Lea | Liv | Lotte | Lucia | Lupe | Mads | Maja | Marlene | Mathieu | Matthew | Maxim | Mia | Miguel | Mizuki | Naja | Nicole | Olivia | Penelope | Raveena | Ricardo | Ruben | Russell | Salli | Seoyeon | Takumi | Tatyana | Vicki | Vitoria | Zeina | Zhiyu | Aria | Ayanda | Arlet | Hannah | Arthur | Daniel | Liam | Pedro | Kajal | Hiujin | Laura | Elin | Ida | Suvi | Ola | Hala | Andres | Sergio | Remi | Adriano | Thiago | Ruth | Stephen | Kazuha | Tomoko | Niamh | Sofie | Lisa | Isabelle | Zayd | Danielle | Gregory | Burcu | Jitka | Sabrina | Jasmine | Jihye | Ambre | Beatrice | Florian | Lennart | Lorenzo | Tiffany`   
Required: Yes

## Response Syntax
<a name="API_SynthesizeSpeech_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-Type: ContentType
x-amzn-RequestCharacters: RequestCharacters

AudioStream
```

## Response Elements
<a name="API_SynthesizeSpeech_ResponseElements"></a>

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

The response returns the following HTTP headers.

 ** [ContentType](#API_SynthesizeSpeech_ResponseSyntax) **   <a name="polly-SynthesizeSpeech-response-ContentType"></a>
 Specifies the type audio stream. This should reflect the `OutputFormat` parameter in your request.   
+  If you request `mp3` as the `OutputFormat`, the `ContentType` returned is audio/mpeg. 
+  If you request `ogg_vorbis` as the `OutputFormat`, the `ContentType` returned is audio/ogg. 
+  If you request `ogg_opus` as the `OutputFormat`, the `ContentType` returned is audio/ogg. 
+  If you request `pcm` as the `OutputFormat`, the `ContentType` returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. 
+  If you request `mu-law` as the `OutputFormat`, the `ContentType` returned is audio/mulaw. 
+  If you request `a-law` as the `OutputFormat`, the `ContentType` returned is audio/alaw. 
+ If you request `json` as the `OutputFormat`, the `ContentType` returned is application/x-json-stream.
 

 ** [RequestCharacters](#API_SynthesizeSpeech_ResponseSyntax) **   <a name="polly-SynthesizeSpeech-response-RequestCharacters"></a>
Number of characters synthesized.

The response returns the following as the HTTP body.

 ** [AudioStream](#API_SynthesizeSpeech_ResponseSyntax) **   <a name="polly-SynthesizeSpeech-response-AudioStream"></a>
 Stream containing the synthesized speech. 

## Errors
<a name="API_SynthesizeSpeech_Errors"></a>

 ** EngineNotSupportedException **   
This engine is not compatible with the voice that you have designated. Choose a new voice that is compatible with the engine or change the engine and restart the operation.  
HTTP Status Code: 400

 ** InvalidSampleRateException **   
The specified sample rate is not valid.  
HTTP Status Code: 400

 ** InvalidSsmlException **   
The SSML you provided is invalid. Verify the SSML syntax, spelling of tags and values, and then try again.  
HTTP Status Code: 400

 ** LanguageNotSupportedException **   
The language specified is not currently supported by Amazon Polly in this capacity.  
HTTP Status Code: 400

 ** LexiconNotFoundException **   
Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region.  
Verify that the lexicon exists, is in the region (see [ListLexicons](API_ListLexicons.md)) and that you spelled its name is spelled correctly. Then try again.  
HTTP Status Code: 404

 ** MarksNotSupportedForFormatException **   
Speech marks are not supported for the `OutputFormat` selected. Speech marks are only available for content in `json` format.  
HTTP Status Code: 400

 ** ServiceFailureException **   
An unknown condition has caused a service failure.  
HTTP Status Code: 500

 ** SsmlMarksNotSupportedForTextTypeException **   
SSML speech marks are not supported for plain text-type input.  
HTTP Status Code: 400

 ** TextLengthExceededException **   
The value of the "Text" parameter is longer than the accepted limits. For the `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.  
HTTP Status Code: 400

## See Also
<a name="API_SynthesizeSpeech_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/polly-2016-06-10/SynthesizeSpeech) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/polly-2016-06-10/SynthesizeSpeech) 