

# Amazon Polly API Reference
API Reference

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.

Authenticated API calls must be signed using the Signature Version 4 Signing Process. For more information, see [Signing Amazon API Requests](https://docs.amazonaws.cn/general/latest/gr/signing_aws_api_requests.html) in the *Amazon Web Services General Reference*.

**Topics**
+ [

# Actions
](API_Operations.md)
+ [

# Data Types
](API_Types.md)
+ [

# Common Error Types
](CommonErrors.md)
+ [

# Common Parameters
](CommonParameters.md)

# Actions


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


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

## Request Syntax


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

## URI Request Parameters


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


The request does not have a request body.

## Response Syntax


```
HTTP/1.1 200
```

## Response Elements


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

## Errors


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


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

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

## 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](#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


The request does not have a request body.

## Response Syntax


```
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


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


 ** 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 Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/polly-2016-06-10/DescribeVoices) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/DescribeVoices) 

# GetLexicon


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

## Request Syntax


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

## URI Request Parameters


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


The request does not have a request body.

## Response Syntax


```
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


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


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


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

# GetSpeechSynthesisTask


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


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

## URI Request Parameters


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


The request does not have a request body.

## Response Syntax


```
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


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


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


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

# ListLexicons


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

## Request Syntax


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

## URI Request Parameters


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


The request does not have a request body.

## Response Syntax


```
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


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


 ** 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 Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/polly-2016-06-10/ListLexicons) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/ListLexicons) 

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

## Request Syntax


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

## URI Request Parameters


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


The request does not have a request body.

## Response Syntax


```
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


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


 ** 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 Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/polly-2016-06-10/ListSpeechSynthesisTasks) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/ListSpeechSynthesisTasks) 

# PutLexicon


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

## Request Syntax


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

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

## URI Request Parameters


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


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


```
HTTP/1.1 200
```

## Response Elements


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

## Errors


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


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

# StartSpeechSynthesisStream


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


```
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


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


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


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

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

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

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


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


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

# StartSpeechSynthesisTask


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


```
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


The request does not use any URI parameters.

## Request Body


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


```
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


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


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


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

# SynthesizeSpeech


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


```
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


The request does not use any URI parameters.

## Request Body


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


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

AudioStream
```

## Response Elements


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


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


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

# Data Types


The following data types are supported:
+  [AudioEvent](API_AudioEvent.md) 
+  [CloseStreamEvent](API_CloseStreamEvent.md) 
+  [FlushStreamConfiguration](API_FlushStreamConfiguration.md) 
+  [Lexicon](API_Lexicon.md) 
+  [LexiconAttributes](API_LexiconAttributes.md) 
+  [LexiconDescription](API_LexiconDescription.md) 
+  [StartSpeechSynthesisStreamActionStream](API_StartSpeechSynthesisStreamActionStream.md) 
+  [StartSpeechSynthesisStreamEventStream](API_StartSpeechSynthesisStreamEventStream.md) 
+  [StreamClosedEvent](API_StreamClosedEvent.md) 
+  [SynthesisTask](API_SynthesisTask.md) 
+  [TextEvent](API_TextEvent.md) 
+  [ThrottlingReason](API_ThrottlingReason.md) 
+  [ValidationExceptionField](API_ValidationExceptionField.md) 
+  [Voice](API_Voice.md) 

# AudioEvent


Contains a chunk of synthesized audio data.

## Contents


 ** AudioChunk **   <a name="polly-Type-AudioEvent-AudioChunk"></a>
A chunk of synthesized audio data encoded in the format specified by the `OutputFormat` parameter.  
Type: Base64-encoded binary data object  
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/AudioEvent) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/AudioEvent) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/AudioEvent) 

# CloseStreamEvent


Indicates the end of the input stream. After sending this event, the input stream will be closed and all audio will be returned.

## Contents


The members of this exception structure are context-dependent.

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/CloseStreamEvent) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/CloseStreamEvent) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/CloseStreamEvent) 

# FlushStreamConfiguration


Configuration that controls when synthesized audio data is sent on the output stream.

## Contents


 ** Force **   <a name="polly-Type-FlushStreamConfiguration-Force"></a>
Specifies whether to force the synthesis engine to immediately write buffered audio data to the output stream.  
Type: Boolean  
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/FlushStreamConfiguration) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/FlushStreamConfiguration) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/FlushStreamConfiguration) 

# Lexicon


Provides lexicon name and lexicon content in string format. For more information, see [Pronunciation Lexicon Specification (PLS) Version 1.0](https://www.w3.org/TR/pronunciation-lexicon/).

## Contents


 ** Content **   <a name="polly-Type-Lexicon-Content"></a>
Lexicon content in string format. The content of a lexicon must be in PLS format.  
Type: String  
Required: No

 ** Name **   <a name="polly-Type-Lexicon-Name"></a>
Name of the lexicon.  
Type: String  
Pattern: `[0-9A-Za-z]{1,20}`   
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/Lexicon) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/Lexicon) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/Lexicon) 

# LexiconAttributes


Contains metadata describing the lexicon such as the number of lexemes, language code, and so on. For more information, see [Managing Lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html).

## Contents


 ** Alphabet **   <a name="polly-Type-LexiconAttributes-Alphabet"></a>
Phonetic alphabet used in the lexicon. Valid values are `ipa` and `x-sampa`.  
Type: String  
Required: No

 ** LanguageCode **   <a name="polly-Type-LexiconAttributes-LanguageCode"></a>
Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on.  
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

 ** LastModified **   <a name="polly-Type-LexiconAttributes-LastModified"></a>
Date lexicon was last modified (a timestamp value).  
Type: Timestamp  
Required: No

 ** LexemesCount **   <a name="polly-Type-LexiconAttributes-LexemesCount"></a>
Number of lexemes in the lexicon.  
Type: Integer  
Required: No

 ** LexiconArn **   <a name="polly-Type-LexiconAttributes-LexiconArn"></a>
Amazon Resource Name (ARN) of the lexicon.  
Type: String  
Required: No

 ** Size **   <a name="polly-Type-LexiconAttributes-Size"></a>
Total size of the lexicon, in characters.  
Type: Integer  
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/LexiconAttributes) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/LexiconAttributes) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/LexiconAttributes) 

# LexiconDescription


Describes the content of the lexicon.

## Contents


 ** Attributes **   <a name="polly-Type-LexiconDescription-Attributes"></a>
Provides lexicon metadata.  
Type: [LexiconAttributes](API_LexiconAttributes.md) object  
Required: No

 ** Name **   <a name="polly-Type-LexiconDescription-Name"></a>
Name of the lexicon.  
Type: String  
Pattern: `[0-9A-Za-z]{1,20}`   
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/LexiconDescription) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/LexiconDescription) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/LexiconDescription) 

# StartSpeechSynthesisStreamActionStream


Inbound event stream for sending input and control events to manage bidirectional speech synthesis.

## Contents


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

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

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/StartSpeechSynthesisStreamActionStream) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/StartSpeechSynthesisStreamActionStream) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/StartSpeechSynthesisStreamActionStream) 

# StartSpeechSynthesisStreamEventStream


Outbound event stream that contains synthesized audio data and stream status events.

## Contents


 ** AudioEvent **   <a name="polly-Type-StartSpeechSynthesisStreamEventStream-AudioEvent"></a>
An audio event containing synthesized speech.  
Type: [AudioEvent](API_AudioEvent.md) object  
Required: No

 ** ServiceFailureException **   <a name="polly-Type-StartSpeechSynthesisStreamEventStream-ServiceFailureException"></a>
An unknown condition has caused a service failure.  
Type: Exception  
HTTP Status Code: 500  
Required: No

 ** ServiceQuotaExceededException **   <a name="polly-Type-StartSpeechSynthesisStreamEventStream-ServiceQuotaExceededException"></a>
An exception indicating a service quota would be exceeded.  
Type: Exception  
HTTP Status Code: 402  
Required: No

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

 ** ThrottlingException **   <a name="polly-Type-StartSpeechSynthesisStreamEventStream-ThrottlingException"></a>
An exception indicating the request was throttled.  
Type: Exception  
HTTP Status Code: 400  
Required: No

 ** ValidationException **   <a name="polly-Type-StartSpeechSynthesisStreamEventStream-ValidationException"></a>
An exception indicating the input failed validation.  
Type: Exception  
HTTP Status Code: 400  
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/StartSpeechSynthesisStreamEventStream) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/StartSpeechSynthesisStreamEventStream) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/StartSpeechSynthesisStreamEventStream) 

# StreamClosedEvent


Indicates that the synthesis stream is closed and provides summary information.

## Contents


 ** RequestCharacters **   <a name="polly-Type-StreamClosedEvent-RequestCharacters"></a>
The total number of characters synthesized during the streaming session.  
Type: Integer  
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/StreamClosedEvent) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/StreamClosedEvent) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/StreamClosedEvent) 

# SynthesisTask


SynthesisTask object that provides information about a speech synthesis task.

## Contents


 ** CreationTime **   <a name="polly-Type-SynthesisTask-CreationTime"></a>
Timestamp for the time the synthesis task was started.  
Type: Timestamp  
Required: No

 ** Engine **   <a name="polly-Type-SynthesisTask-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 **   <a name="polly-Type-SynthesisTask-LanguageCode"></a>
Optional language code for a synthesis task. 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 **   <a name="polly-Type-SynthesisTask-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 **   <a name="polly-Type-SynthesisTask-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: No

 ** OutputUri **   <a name="polly-Type-SynthesisTask-OutputUri"></a>
Pathway for the output speech file.  
Type: String  
Required: No

 ** RequestCharacters **   <a name="polly-Type-SynthesisTask-RequestCharacters"></a>
Number of billable characters synthesized.  
Type: Integer  
Required: No

 ** SampleRate **   <a name="polly-Type-SynthesisTask-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 **   <a name="polly-Type-SynthesisTask-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 **   <a name="polly-Type-SynthesisTask-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

 ** TaskId **   <a name="polly-Type-SynthesisTask-TaskId"></a>
The Amazon Polly generated identifier for a speech synthesis task.  
Type: String  
Pattern: `^[a-zA-Z0-9_-]{1,100}$`   
Required: No

 ** TaskStatus **   <a name="polly-Type-SynthesisTask-TaskStatus"></a>
Current status of the individual speech synthesis task.  
Type: String  
Valid Values: `scheduled | inProgress | completed | failed`   
Required: No

 ** TaskStatusReason **   <a name="polly-Type-SynthesisTask-TaskStatusReason"></a>
Reason for the current status of a specific speech synthesis task, including errors if the task has failed.  
Type: String  
Required: No

 ** TextType **   <a name="polly-Type-SynthesisTask-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 **   <a name="polly-Type-SynthesisTask-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: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/SynthesisTask) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/SynthesisTask) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/SynthesisTask) 

# TextEvent


Contains text content to be synthesized into speech.

## Contents


 ** Text **   <a name="polly-Type-TextEvent-Text"></a>
The text content to synthesize. If you specify `ssml` as the `TextType`, follow the SSML format for the input text.  
Type: String  
Required: Yes

 ** FlushStreamConfiguration **   <a name="polly-Type-TextEvent-FlushStreamConfiguration"></a>
Configuration for controlling when synthesized audio flushes to the output stream.  
Type: [FlushStreamConfiguration](API_FlushStreamConfiguration.md) object  
Required: No

 ** TextType **   <a name="polly-Type-TextEvent-TextType"></a>
Specifies whether the input text is plain text or SSML. Default: plain text.  
Type: String  
Valid Values: `ssml | text`   
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/TextEvent) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/TextEvent) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/TextEvent) 

# ThrottlingReason


Provides information about a specific throttling reason.

## Contents


 ** reason **   <a name="polly-Type-ThrottlingReason-reason"></a>
The reason code explaining why the request was throttled.  
Type: String  
Required: No

 ** resource **   <a name="polly-Type-ThrottlingReason-resource"></a>
The resource that caused the throttling.  
Type: String  
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/ThrottlingReason) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/ThrottlingReason) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/ThrottlingReason) 

# ValidationExceptionField


Information about a field that failed validation.

## Contents


 ** message **   <a name="polly-Type-ValidationExceptionField-message"></a>
A message describing why the field failed validation.  
Type: String  
Required: Yes

 ** name **   <a name="polly-Type-ValidationExceptionField-name"></a>
The name of the field that failed validation.  
Type: String  
Required: Yes

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/ValidationExceptionField) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/ValidationExceptionField) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/ValidationExceptionField) 

# Voice


Description of the voice.

## Contents


 ** AdditionalLanguageCodes **   <a name="polly-Type-Voice-AdditionalLanguageCodes"></a>
Additional codes for languages available for the specified voice in addition to its default language.   
For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code `hi-IN`.  
Type: Array of strings  
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

 ** Gender **   <a name="polly-Type-Voice-Gender"></a>
Gender of the voice.  
Type: String  
Valid Values: `Female | Male`   
Required: No

 ** Id **   <a name="polly-Type-Voice-Id"></a>
Amazon Polly assigned voice ID. This is the ID that you specify when calling the `SynthesizeSpeech` 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: No

 ** LanguageCode **   <a name="polly-Type-Voice-LanguageCode"></a>
Language code of the voice.  
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

 ** LanguageName **   <a name="polly-Type-Voice-LanguageName"></a>
Human readable name of the language in English.  
Type: String  
Required: No

 ** Name **   <a name="polly-Type-Voice-Name"></a>
Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might display in your application.  
Type: String  
Required: No

 ** SupportedEngines **   <a name="polly-Type-Voice-SupportedEngines"></a>
Specifies which engines (`standard`, `neural`, `long-form` or `generative`) are supported by a given voice.  
Type: Array of strings  
Valid Values: `standard | neural | long-form | generative`   
Required: No

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/polly-2016-06-10/Voice) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/polly-2016-06-10/Voice) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/polly-2016-06-10/Voice) 

# Common Error Types


This section lists common error types that this Amazon service may return. Not all services return all error types listed here. For errors specific to an API action for this service, see the topic for that API action.

 **AccessDeniedException**   <a name="CommonErrors-AccessDeniedException"></a>
You don't have permission to perform this action. Verify that your IAM policy includes the required permissions.  
HTTP Status Code: 403

 **ExpiredTokenException**   <a name="CommonErrors-ExpiredTokenException"></a>
The security token included in the request has expired. Request a new security token and try again.  
HTTP Status Code: 403

 **IncompleteSignature**   <a name="CommonErrors-IncompleteSignature"></a>
The request signature doesn't conform to Amazon standards. Verify that you're using valid Amazon credentials and that your request is properly formatted. If you're using an SDK, ensure it's up to date.  
HTTP Status Code: 403

 **InternalFailure**   <a name="CommonErrors-InternalFailure"></a>
The request can't be processed right now because of an internal server issue. Try again later. If the problem persists, contact Amazon Support.  
HTTP Status Code: 500

 **MalformedHttpRequestException**   <a name="CommonErrors-MalformedHttpRequestException"></a>
The request body can't be processed. This typically happens when the request body can't be decompressed using the specified content encoding algorithm. Verify that the content encoding header matches the compression format used.  
HTTP Status Code: 400

 **NotAuthorized**   <a name="CommonErrors-NotAuthorized"></a>
You don't have permissions to perform this action. Verify that your IAM policy includes the required permissions.  
HTTP Status Code: 401

 **OptInRequired**   <a name="CommonErrors-OptInRequired"></a>
Your Amazon account needs a subscription for this service. Verify that you've enabled the service in your account.  
HTTP Status Code: 403

 **RequestAbortedException**   <a name="CommonErrors-RequestAbortedException"></a>
The request was aborted before a response could be returned. This typically happens when the client closes the connection.  
HTTP Status Code: 400

 **RequestEntityTooLargeException**   <a name="CommonErrors-RequestEntityTooLargeException"></a>
The request entity is too large. Reduce the size of the request body and try again.  
HTTP Status Code: 413

 **RequestTimeoutException**   <a name="CommonErrors-RequestTimeoutException"></a>
The request timed out. The server didn't receive the complete request within the expected time frame. Try again.  
HTTP Status Code: 408

 **ServiceUnavailable**   <a name="CommonErrors-ServiceUnavailable"></a>
The service is temporarily unavailable. Try again later.  
HTTP Status Code: 503

 **ThrottlingException**   <a name="CommonErrors-ThrottlingException"></a>
Your request rate is too high. The Amazon SDKs automatically retry requests that receive this exception. Reduce the frequency of requests.  
HTTP Status Code: 400

 **UnknownOperationException**   <a name="CommonErrors-UnknownOperationException"></a>
The action or operation isn't recognized. Verify that the action name is spelled correctly and that it's supported by the API version you're using.  
HTTP Status Code: 404

 **UnrecognizedClientException**   <a name="CommonErrors-UnrecognizedClientException"></a>
The X.509 certificate or Amazon access key ID you provided doesn't exist in our records. Verify that you're using valid credentials and that they haven't expired.  
HTTP Status Code: 403

 **ValidationError**   <a name="CommonErrors-ValidationError"></a>
The input doesn't meet the required format or constraints. Check that all required parameters are included and that values are valid.  
HTTP Status Code: 400

# Common Parameters


The following list contains the parameters that all actions use for signing Signature Version 4 requests with a query string. Any action-specific parameters are listed in the topic for that action. For more information about Signature Version 4, see [Signing Amazon API requests](https://docs.amazonaws.cn/IAM/latest/UserGuide/reference_aws-signing.html) in the *IAM User Guide*.

 **X-Amz-Algorithm**   <a name="CommonParameters-X-Amz-Algorithm"></a>
The hash algorithm that you used to create the request signature.  
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.  
Type: string  
Valid Values: `AWS4-HMAC-SHA256`   
Required: Conditional

 **X-Amz-Credential**   <a name="CommonParameters-X-Amz-Credential"></a>
The credential scope value, which is a string that includes your access key, the date, the region you are targeting, the service you are requesting, and a termination string ("aws4\$1request"). The value is expressed in the following format: *access\$1key*/*YYYYMMDD*/*region*/*service*/aws4\$1request.  
For more information, see [Create a signed Amazon API request](https://docs.amazonaws.cn/IAM/latest/UserGuide/create-signed-request.html) in the *IAM User Guide*.  
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.  
Type: string  
Required: Conditional

 **X-Amz-Date**   <a name="CommonParameters-X-Amz-Date"></a>
The date that is used to create the signature. The format must be ISO 8601 basic format (YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value: `20120325T120000Z`.  
Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for signing requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is not required. When X-Amz-Date is used, it always overrides the value of the Date header. For more information, see [Elements of an Amazon API request signature](https://docs.amazonaws.cn/IAM/latest/UserGuide/signing-elements.html) in the *IAM User Guide*.  
Type: string  
Required: Conditional

 **X-Amz-Security-Token**   <a name="CommonParameters-X-Amz-Security-Token"></a>
The temporary security token that was obtained through a call to Amazon Security Token Service (Amazon STS). For a list of services that support temporary security credentials from Amazon STS, see [Amazon Web Services services that work with IAM](https://docs.amazonaws.cn/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.  
Condition: If you're using temporary security credentials from Amazon STS, you must include the security token.  
Type: string  
Required: Conditional

 **X-Amz-Signature**   <a name="CommonParameters-X-Amz-Signature"></a>
Specifies the hex-encoded signature that was calculated from the string to sign and the derived signing key.  
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.  
Type: string  
Required: Conditional

 **X-Amz-SignedHeaders**   <a name="CommonParameters-X-Amz-SignedHeaders"></a>
Specifies all the HTTP headers that were included as part of the canonical request. For more information about specifying signed headers, see [Create a signed Amazon API request](https://docs.amazonaws.cn/IAM/latest/UserGuide/create-signed-request.html) in the *IAM User Guide*.  
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.  
Type: string  
Required: Conditional