Amazon Polly
开发人员指南
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

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 requires the following URI parameters.

TaskId

The Amazon Polly generated identifier for a speech synthesis task.

Pattern: ^[a-zA-Z0-9_-]{1,100}$

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "SynthesisTask": { "CreationTime": number, "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

SynthesisTask object that provides information from the requested task, including output format, creation time, task status, and so on.

Type: SynthesisTask 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 AWS SDKs, see the following: