Get Instant Solutions for Kubernetes, Databases, Docker and more
AWS Polly is a cloud-based service that converts text into lifelike speech, enabling developers to create applications that can talk. It is part of Amazon Web Services and is widely used for creating voice-enabled applications, enhancing accessibility, and generating audio content.
When using AWS Polly, you might encounter the error SpeechMarkTypeNotSupportedException
. This error typically occurs when a request is made for a speech mark type that is not supported by the selected voice.
During the execution of your application, you may receive an error message indicating that the speech mark type is not supported. This can halt the speech synthesis process and prevent your application from functioning as expected.
The SpeechMarkTypeNotSupportedException
is raised when there is a mismatch between the requested speech mark types and the capabilities of the chosen voice. Speech marks are metadata that provide information about the speech, such as word boundaries and sentence breaks, which can be useful for applications requiring precise control over speech output.
To resolve the SpeechMarkTypeNotSupportedException
, follow these steps:
Check the AWS Polly documentation to determine which speech mark types are supported by the voice you are using. You can find this information in the AWS Polly Speech Marks Documentation.
Adjust your request to include only the supported speech mark types. For example, if you are using a voice that supports only 'word' and 'sentence' speech marks, ensure your request does not include unsupported types like 'ssml'.
{
"OutputFormat": "json",
"Text": "Hello, world!",
"VoiceId": "Joanna",
"SpeechMarkTypes": ["word", "sentence"]
}
If your application requires specific speech marks that are not supported by the current voice, consider selecting a different voice that supports the desired speech marks. Refer to the AWS Polly Voice List for a comprehensive list of voices and their capabilities.
By understanding the capabilities of AWS Polly voices and adjusting your requests accordingly, you can effectively resolve the SpeechMarkTypeNotSupportedException
and ensure smooth operation of your voice-enabled applications. For further assistance, consult the AWS Support page.
(Perfect for DevOps & SREs)
Try Doctor Droid — your AI SRE that auto-triages alerts, debugs issues, and finds the root cause for you.