Get Instant Solutions for Kubernetes, Databases, Docker and more
AWS Polly is a service provided by Amazon Web Services that turns text into lifelike speech. It allows developers to create applications that can 'speak' in a variety of languages and voices, making it a powerful tool for creating interactive and engaging user experiences. Polly is commonly used in applications such as voice assistants, e-learning platforms, and any other application that requires text-to-speech capabilities.
When using AWS Polly, you might encounter an error message that reads: UnsupportedPlsLanguageException
. This error indicates that there is an issue with the language specified in your PLS (Pronunciation Lexicon Specification) file.
When this error occurs, your application will fail to generate speech output for the specified text. Instead, it will return an exception, halting any further processing until the issue is resolved.
The UnsupportedPlsLanguageException
is thrown when the language code specified in your PLS file is not supported by AWS Polly. PLS files are used to define custom pronunciations for words, and they must adhere to the supported language codes.
PLS language codes are standardized codes that represent different languages. AWS Polly supports a specific set of these codes, and using an unsupported code will result in this exception. You can find a list of supported languages in the AWS Polly Documentation.
To fix the UnsupportedPlsLanguageException
, follow these steps:
Check your PLS file to ensure that the language code specified is correct and supported by AWS Polly. Refer to the list of supported languages to confirm.
If the language code is incorrect, update it to a supported code. For example, if you mistakenly used 'fr-CA' for Canadian French, ensure it is supported or switch to 'fr-FR' if only French is supported.
After making the necessary changes, test your application to ensure that the error is resolved and that Polly can successfully generate speech output.
By ensuring that your PLS files use supported language codes, you can avoid the UnsupportedPlsLanguageException
and ensure smooth operation of your AWS Polly-powered applications. For more detailed guidance, refer to the AWS Polly User Guide.
(Perfect for DevOps & SREs)
Try Doctor Droid — your AI SRE that auto-triages alerts, debugs issues, and finds the root cause for you.