Debug Your Infrastructure

Get Instant Solutions for Kubernetes, Databases, Docker and more

AWS CloudWatch
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Pod Stuck in CrashLoopBackOff
Database connection timeout
Docker Container won't Start
Kubernetes ingress not working
Redis connection refused
CI/CD pipeline failing

AWS Polly SpeechMarkTypeNotSupportedException

The requested speech mark type is not supported for the selected voice.

Resolving SpeechMarkTypeNotSupportedException in AWS Polly

Understanding AWS Polly

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.

Identifying the Symptom

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.

What You Observe

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.

Exploring the Issue

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.

Common Causes

  • Requesting unsupported speech mark types for a specific voice.
  • Using a voice that does not support any speech marks.

Steps to Fix the Issue

To resolve the SpeechMarkTypeNotSupportedException, follow these steps:

1. Review Supported Speech Marks

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.

2. Modify Your Request

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"]
}

3. Choose a Different Voice

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.

Conclusion

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.

Master 

AWS Polly SpeechMarkTypeNotSupportedException

 debugging in Minutes

— Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

🚀 Tired of Noisy Alerts?

Try Doctor Droid — your AI SRE that auto-triages alerts, debugs issues, and finds the root cause for you.

Heading

Your email is safe thing.

Thank you for your Signing Up

Oops! Something went wrong while submitting the form.

MORE ISSUES

Deep Sea Tech Inc. — Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid