Amazon Polly
Text-to-speech on AWS: generative, long-form, neural, and standard voices, SSML, pronunciation lexicons, speech marks, synchronous and asynchronous synthesis to S3 with SNS notification, caching and replaying audio, security, and cost.
3 min read · Last reviewed · SAA-C03
Sign in to bookmark tutorials and track what you have read.
On this page
What it is
Amazon Polly is a text-to-speech (TTS) service that turns text into lifelike speech. It supports many languages and voices, so you can add speech to applications for engagement and accessibility. You pay only for the text you synthesize, and you can cache and replay the generated audio at no additional cost.
Choose Polly when a question asks to read text aloud: newsreaders, e-learning, games, accessibility for visually impaired users, IoT devices, announcements, or audio versions of articles. Polly goes from text to speech; for the opposite direction, speech to text, use Amazon Transcribe.
Voices
- Generative voices: the most expressive and human-like.
- Long-form voices: for long content such as articles and audiobooks.
- Neural voices: natural-sounding speech, including a Newscaster speaking style.
- Standard voices: the original, lowest-cost option.
Controlling the speech
- SSML (Speech Synthesis Markup Language): tags in the text control pronunciation, volume, speaking rate, pauses, and emphasis.
- Pronunciation lexicons: store custom pronunciations for words such as brand names or acronyms, and apply them when synthesizing. Lexicons are stored per AWS RegionA separate geographic area where AWS runs its services, such as us-east-1 in Northern Virginia, made up of several Availability Zones. Most resources live in one Region; you choose Regions for latency, data residency, and the services you need.Glossary entry.
- Speech marks: metadata that says where each sentence or word starts and ends in the audio, for example to highlight words as they are spoken or to animate lips.
Synchronous or asynchronous
- SynthesizeSpeech returns audio immediately, for short text and near real-time use.
- For long text (up to 100,000 billable characters), use asynchronous synthesis with
StartSpeechSynthesisTask. Polly saves the audio file to an S3 bucket and can notify you through an SNS topic when it is ready.
Security, resilience, performance, and cost
Security
- IAM controls access; output written to S3 follows the bucket's encryption and access policies.
- CloudTrail records API (Application programming interface)A defined way for one program to ask another for data or actions, such as a set of HTTPS requests and responses. Every AWS service is controlled through its API, which the console, the CLI, and the SDKs call for you.Glossary entry calls.
Resilience and performance
- Polly is a managed, Regional service. Store generated audio in S3 (and serve it through CloudFront) instead of synthesizing the same text again.
Cost
- Pay per character synthesized; prices differ by voice type (standard voices cost least; neural, generative, and long-form cost progressively more). Replaying cached audio is free.
Monitoring
- CloudWatch metrics for requests and errors; CloudTrail for auditing.
Polly or another option?
| If the requirement is | Choose |
|---|---|
| Read text aloud in a natural voice | Amazon Polly |
| Convert speech or call recordings to text | Amazon Transcribe |
| A two-way chatbot or voice assistant | Amazon Lex |
| Translate text before speaking it | Amazon Translate, then Polly |
Reverse mindmap: when the question points here
- Yes, when the question says
- Convert text to lifelike speech leads to Polly
- Audio versions of articles or e-learning leads to Polly
- Accessibility for visually impaired users leads to Polly
- Control the output
- Change pronunciation, speed, or pauses leads to SSML
- Brand names pronounced correctly leads to Pronunciation lexicon
- Highlight each word as it is spoken leads to Speech marks
- Very long text leads to Asynchronous task to S3, SNS notification
- Most natural voice leads to Generative or neural voices
- No, when the question says
- Speech to text leads to Transcribe
- Understand what the user says leads to Lex
Key takeaways
- Polly converts text to speech, with generative, long-form, neural, and standard voices.
- SSML controls pronunciation, volume, and rate; lexicons fix specific words; speech marks give word timings.
- Long text uses asynchronous synthesis, which saves audio to S3 and can notify through SNS.
- Pay per character; cache and replay audio at no extra cost.
Sources
- Amazon Polly Developer Guide: What is Amazon Polly?
- Amazon Polly Developer Guide: Available voices
- Amazon Polly Developer Guide: Generative voices
- Amazon Polly Developer Guide: Long-form voices
- Amazon Polly Developer Guide: Neural voices
- Amazon Polly Developer Guide: Generating speech from SSML documents
- Amazon Polly Developer Guide: Managing lexicons
- Amazon Polly Developer Guide: Speech marks
- Amazon Polly Developer Guide: Long audio files
- Amazon Polly Developer Guide: Logging Amazon Polly API calls with AWS CloudTrail
- Amazon Polly pricing