GetVoice
Returns the status and properties of a custom voice. Use this
operation after CreateVoice to check whether the status of
the voice is active or failed. Unlike
DescribeVoices, GetVoice also returns
Arn, VoiceCreationData,
CustomerManagedEncryption, and
StatusReason. If no custom voice with the specified ID exists
in your account and Region, the request fails with
ResourceNotFoundException.
This operation requires permissions to perform the
polly:GetVoice action.
Request Syntax
GET /v1/voices/VoiceId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- VoiceId
-
The ID of the custom voice that
CreateVoicereturned, for example,vc-9a8fa85dd3. You can't specify the ARN of the voice.Length Constraints: Maximum length of 32.
Pattern:
^vc-[0-9a-f]+$Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"Voice": {
"AdditionalLanguageCodes": [ "string" ],
"Arn": "string",
"CreationTime": number,
"CustomerManagedEncryption": {
"EncryptionContext": {
"string" : "string"
},
"KmsKeyArn": "string"
},
"Gender": "string",
"Id": "string",
"LanguageCode": "string",
"LanguageName": "string",
"Name": "string",
"Origin": "string",
"Status": "string",
"StatusReason": "string",
"SupportedEngines": [ "string" ],
"VoiceCreationData": {
"Recordings": [
{
"Data": {
"Bytes": blob,
"S3Url": "string"
},
"Format": "string"
}
]
}
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Errors
For information about the errors that are common to all actions, see Common Error Types.
- ResourceNotFoundException
-
Amazon Polly can't find the specified resource. Verify that the resource exists in the AWS account and Region of the request and that its ARN or ID is spelled correctly, and then try again.
- resourceId
-
The identifier of the resource that wasn't found.
- resourceType
-
The type of the resource that wasn't found.
HTTP Status Code: 404
- ServiceFailureException
-
An unknown condition has caused a service failure.
HTTP Status Code: 500
- 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. If Amazon Polly can't use the AWS KMS key that you specified in
CreateVoice,fieldsnamesCustomerManagedEncryption.KmsKeyArnand the reason is one of the following:- kmsKeyNotFound
-
No key with the specified ARN exists.
- kmsKeyUnusable
-
The key is disabled, scheduled for deletion, or missing its key material, or it isn't a symmetric encryption key.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: