Get Instant Solutions for Kubernetes, Databases, Docker and more
AWS Polly is a service provided by Amazon Web Services that converts text into lifelike speech. It allows developers to create applications that can talk, making it a valuable tool for enhancing user interaction through voice. Polly supports a variety of languages and voices, enabling developers to choose the most suitable voice for their application needs.
When using AWS Polly, you might encounter the UnsupportedLanguageException
. This error typically manifests when you attempt to synthesize speech using a language that is not supported by the selected voice. The error message will indicate that the language is not compatible with the voice you have chosen.
The UnsupportedLanguageException
occurs when there is a mismatch between the language specified in your request and the capabilities of the voice you are trying to use. Each voice in AWS Polly supports specific languages, and attempting to use a voice with an unsupported language will trigger this exception.
To resolve the UnsupportedLanguageException
, follow these steps:
Check the AWS Polly documentation to ensure that the language you want to use is supported by the voice you have selected. You can find a list of supported languages and voices in the AWS Polly Voice List.
Modify your request to use a compatible language and voice pair. For example, if you are using the Joanna
voice, ensure that your language code is set to en-US
for English (US).
{
"Text": "Hello, world!",
"VoiceId": "Joanna",
"LanguageCode": "en-US"
}
After updating your request, test the configuration by synthesizing speech again. If the issue persists, double-check the language and voice compatibility.
For more information on AWS Polly and troubleshooting, visit the AWS Polly Homepage and the AWS Polly Troubleshooting Guide.
(Perfect for DevOps & SREs)
Try Doctor Droid — your AI SRE that auto-triages alerts, debugs issues, and finds the root cause for you.