AWS Builder Center
Give Your App a Human Voice — A Friendly Guide to Amazon Polly

Give Your App a Human Voice — A Friendly Guide to Amazon Polly

A beginner-friendly guide to Amazon Polly — the day I stopped fighting robotic browser voices and let my little Nepali vocabulary app finally speak like a person.

The backstory: it started with an app that couldn't talk

A few months ago I was deep into a side project: a small Nepali vocabulary app. Pretty standard flashcard stuff — except there was one thing it absolutely had to do. It needed to say each word out loud. If you're learning a language, hearing the word matters as much as reading it.
Simple, right? I thought so too. So I reached for the obvious free tool.

Attempt #1: the browser's built-in voice

The Web Speech API is built into every browser. It's free, it's already there, no setup. I plugged it in and… it was rough. The voices sounded like a robot from a bad 90s movie, and worse, they sounded completely different on every device. My Android phone, my laptop, my friend's iPhone — three different robots.
Then I hit the real dealbreakers:
  • I couldn't save the audio. Every single tap re-generated the sound from scratch.
  • It needed the internet, always. No connection meant no audio — dead in the water.
  • I had zero control over how anything was pronounced.
So I went back to the drawing board — or more honestly, back to scrolling the AWS service catalog. And there it was, a name I'd skimmed past a hundred times:
🔊 Amazon Polly. It does one beautiful thing — turns text into speech — and it does it so well the result genuinely sounds like a person sat down and recorded it.

What's in this guide

What is Polly?

Think of Polly as a professional audio studio for your text. You hand it words, it hands back a high-quality audio file. No machine-learning PhD, no complicated setup. Here's what makes it click:
  • Standard voices — fast, cheap, solid text-to-speech in 30+ languages.
  • Neural voices — the magic. Deep learning gives these natural rhythm, breathing, and inflection. They sound truly human.
  • SSML — drop simple tags into your text to control pauses, emphasis, speed, and pronunciation.
  • Speech marks — timestamps for every word, perfect for karaoke-style highlighting.
  • Multiple formats — MP3, OGG, PCM, whatever your app needs.
And it all happens with one simple API call. Seriously.

The 10-step console tour

Before I write a single line of code, I always poke around a service in the AWS Console. It's the fastest way to feel what something can really do. Here's exactly what I tried — follow along and you'll hear the difference for yourself.

Step 1 — Find Polly

Log in, type  Polly  into the search bar at the top, and click Amazon Polly — Turn Text into Lifelike Speech.


Step 2 — Get your bearings on the dashboard

The left sidebar is your map. Three things to know:
  • Text-to-Speech — the playground, where we'll spend most of our time.
  • S3 synthesis tasks — for processing a big file like a whole chapter, not just one sentence.
  • Lexicons — custom pronunciation rules (e.g. say "AWS" as "A-W-S", not "Awws").
Click Text-to-Speech to open the playground.


Step 3 — Meet the playground

The big box in the middle is your input. On the side you pick an engine (Standard or Neural) and a voice. There are plenty of voices to choose from — try a few and see who you like.


Step 4 — Hear the magic (Neural)

Select Neural, choose English, US and the Joanna voice, type a sentence, and hit the orange Listen button.
Listen closely. Hear the rhythm? The little breaths? That's what a human sounds like — and that's what your users will experience.


Step 5 — Now meet the robot (Standard)

Switch the engine to Standard and listen to the same sentence again. It's clear, but flat and unemotional. That's the quality gap you pay a tiny bit more to close — the difference between a person and a machine.


Step 6 — Try another language

This is where my project got its boost. I don't have to transliterate anything — I just switch the language and paste the real script. Here I set the language to Hindi, picked a voice, and pasted Devanagari text straight in:  नमस्ते, आप कैसे हैं? 
Polly reads it natively. It just works.

💡 A small honest note: Polly doesn't have a dedicated Nepali voice yet, so for my Nepali app I use a Hindi voice — it handles the shared Devanagari script really well and sounds natural for most words.

Step 7 — Direct the performance with SSML

Flip on the SSML toggle. SSML (Speech Synthesis Markup Language) is how you direct the delivery — pauses, emphasis, speed. Paste this in and press Listen:
<speak>
Welcome to the demo.
<break time="700ms"/>
This word is <emphasis level="strong">important</emphasis>.
<break time="500ms"/>
And this part is spoken <prosody rate="slow">much more slowly</prosody>.
</speak>


You just added a perfect pause and a punchy emphasis — zero code required.

Step 8 — Get the file

See the Download button at the top-right of the panel (it's in every screenshot above)? Click it. The audio isn't trapped in the browser — it's a real .mp3 file. You can store it on S3, cache it, or bundle it with your app.

⬇️ This one button is the whole reason Polly beats the browser: you own the audio.

Step 9 — Check out batch mode

Need to process a whole blog post or a massive document? The S3 synthesis tasks section is your friend. You submit the text, Polly processes it in the background, and the final audio lands directly in an S3 bucket.


Step 10 — Peek behind the curtain

Back in Text-to-Speech, hit Listen one more time, then open your browser's Developer Tools (F12) and look at the Network tab. You'll see the request to Polly. Check the headers:  Content-Type: audio/mpeg .

Your app's code gets the exact same thing — a raw audio stream. The console is just a friendly face on top of a powerful API.

So I built a real app: VoiceIQ

I wanted to get past the console, so I built VoiceIQ — a simple flashcard app for learning Nepali vocabulary. Tap a card, and Polly reads the word out loud.

The clever bit is the caching. The first time you tap a word, the app fetches the MP3 from Polly. Every tap after that plays the saved file — absolutely instant, and free.

Open a card and you get three playback buttons: the Word, the Transliteration, and a Full Sentence example. Each one calls Polly once, then keeps that audio forever.

How little code it actually took

I used the AWS SDK and let the browser talk directly to Polly — I didn't even need a custom backend. When you tap the speaker icon, one function fires a  SynthesizeSpeech  call with the text, the voice ID, and the MP3 format. The whole integration lives in one file,  polly.js , and it's under 40 lines.
Three things worth calling out from that file:
  • The cache. In a learning app you repeat words constantly. A simple  Map  means I only pay for the first request — every tap after is instant and free.
  • Streaming. Polly returns a stream. The code uses a  for await  loop to collect the audio chunks into a playable  Blob . It's the one part of the SDK you learn by doing, but the pattern is easy once you've seen it.
  •  Engine: "neural" . The single most important line. Neural costs about 4× Standard — but that's still a fraction of a cent per request, and the quality is non-negotiable for a good experience.

Polly vs the browser's built-in voice

Fair question: why not just use the free browser tool? Here's the blunt comparison.

Web Speech API
Amazon Polly
Cost
Free
~$0.000004 / char (Neural)
Voice quality
Inconsistent
Professional, genuinely human
Languages
Limited
30+, totally consistent
Cacheable audio
✗
✅ You own the MP3 file
SSML control
Very limited
Full control over pacing, pitch, etc.
Server-side generation
✗
✅ (with batch jobs)
Works offline
✗
✅ (if you cache the files)
The cost really is tiny. A 100-character sentence costs about $0.0004 to synthesize — you could generate 10,000 sentences for roughly four dollars.
🎯 The takeaway: use Web Speech to quickly prototype. Use Polly the moment voice quality actually matters to your users.

When Polly is the right call

  • Language-learning apps — the absolute best use case (that's me).
  • Accessibility — reading text aloud where flat, robotic voices are hard to follow.
  • Audio content — automatically turning blog posts into podcast-style audio.
  • IVR / phone systems — it plugs into Amazon Connect for realistic phone voices.
Basically: any time you use the native browser voice and immediately flinch.

Try it yourself in about 5 minutes

Getting set up is quick:
# 1. Install the SDK
npm install @aws-sdk/client-polly

# 2. Create .env.local in your project root (DON'T COMMIT THIS)
VITE_AWS_ACCESS_KEY_ID=your_key_here
VITE_AWS_SECRET_ACCESS_KEY=your_secret_here
VITE_AWS_REGION=ap-south-1

# 3. Run it
npm install && npm run dev

🔐 Security note: give the IAM user the  AmazonPollyReadOnlyAccess  policy — that's all it needs. And please, never paste your keys into a chat or push them to GitHub. Keep them in  .env.local  and add it to  .gitignore .

Final thoughts: notes from a convert

I built VoiceIQ mostly to force myself to learn Polly, and honestly the biggest lesson was: why did I wait this long?
The Web Speech API is tempting because it's free and right there. But the quality jump, the ability to cache and own your MP3s, and the consistency across every device are genuinely transformative for the user experience.
If you're still on the fence, just do the console tour above — steps 1 through 10. Spend five minutes hearing the difference between Neural and Standard on your own content, download the MP3, and try a bit of SSML. That alone will tell you which path to take before you write a single line of code.
It's a ten-minute integration that instantly delivers professional-level audio. Go give your app a voice.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article