# Amazon polly

> Amazon polly is an open-source agent skill for developer tools. Guides an agent through building Amazon Polly text-to-speech code correctly. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/aws-samples/amazon-ai-samples/tree/main/text-to-speech/skills/amazon-polly
- **Repository:** https://github.com/aws-samples/amazon-ai-samples
- **GitHub stars:** 469
- **License:** MIT-0
- **Skill name:** amazon-polly
- **Collection:** https://github.com/aws-samples/amazon-ai-samples
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill gives a coding agent a detailed reference for building with Amazon Polly. It covers picking between synchronous, asynchronous and streaming synthesis APIs, choosing an engine and a voice that supports it, and writing requests that avoid common failures, such as limits on text length, sample rates and SSML tags that a given engine does not accept.

The guide also covers operational concerns. It explains how to handle pronunciation with stored lexicons or inline SSML, how to request speech marks for captions and lip-sync, how cloned voices are created and retired with consent and confirmation steps, and how to map common Polly error codes to their fixes. It includes retry guidance, least-privilege IAM actions, per-character cost behaviour, and cleanup of lexicons, S3 output and voices.

Examples are written in Python with boto3, and the skill points to runnable samples in the same repository for each topic. Using it requires an AWS account with Polly access and credentials configured through the SDK's default chain.

## When your agent uses it

> Best practices for building with Amazon Polly text-to-speech — choosing synthesis APIs, engines, and compatible voices; creating and managing cloned voices; output formats; engine-safe SSML; pronunciation lexicons; speech marks for captions and lip-sync; limits; errors; retries; IAM; and cost. Use when writing, reviewing, or debugging code that calls Polly; choosing or cloning a voice; fixing pronunciation; or handling Polly API errors. Not for Transcribe-, Translate-, or Bedrock-only questions.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/aws-samples/amazon-ai-samples/tree/HEAD/text-to-speech/skills/amazon-polly)
- [License: MIT-0](https://github.com/aws-samples/amazon-ai-samples/tree/HEAD/text-to-speech/skills/amazon-polly)

## Features

- **Synthesis API selection:** Explains when to use synchronous calls, async S3 tasks, or bidirectional streaming.
- **Engine and voice validation:** Shows how to list voices per Region and confirm engine support before billed calls.
- **Engine-safe SSML:** Lists which SSML tags each engine supports and how to filter model-written markup.
- **Pronunciation lexicons:** Covers PLS lexicon rules, size limits, propagation delays and review of generated entries.
- **Speech marks for lip-sync:** Describes requesting word, sentence and viseme timings alongside matching audio.
- **Cloned voice workflow:** Outlines consent gates, recording requirements, creation polling and deletion safeguards.
- **Errors and cost control:** Maps common Polly exceptions to fixes and explains per-character billing and caching.

## Good for

- Write a Python function that converts long articles into MP3 narration stored in S3
- Debug an InvalidSsmlException raised by a Polly synthesis call
- Add a lexicon so a brand name is pronounced correctly across requests
- Generate word and viseme timings to drive an avatar's mouth movements
- Find which neural voices support a given language in a specific AWS Region

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/amazon-polly` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/amazon-polly &&
cp -R "$tmp/text-to-speech/skills/amazon-polly" ~/.claude/skills/amazon-polly &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/amazon-polly` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/amazon-polly` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/amazon-polly &&
cp -R "$tmp/text-to-speech/skills/amazon-polly" ~/.agents/skills/amazon-polly &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/amazon-polly` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/amazon-polly` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/amazon-polly &&
cp -R "$tmp/text-to-speech/skills/amazon-polly" ~/.cursor/skills/amazon-polly &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/amazon-polly` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/aws-samples/amazon-ai-samples.git --path text-to-speech/skills/amazon-polly
```

Or copy the folder to `~/.gemini/skills/amazon-polly` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/amazon-polly`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/amazon-polly &&
cp -R "$tmp/text-to-speech/skills/amazon-polly" ~/.copilot/skills/amazon-polly &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/amazon-polly` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git
```

Then copy `amazon-ai-samples/text-to-speech/skills/amazon-polly` into your agent's skills folder as `amazon-polly`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does the skill change my AWS account or run any scripts?

No scripts are included. It is a reference guide that the agent reads while writing or reviewing Polly code, though it recommends read-only checks before any action on an account.

### Which Polly features does Amazon polly cover?

It covers synchronous synthesis, async tasks to S3, bidirectional streaming, speech marks, SSML, pronunciation lexicons, voice cloning, error handling, IAM and cost.

### Does Amazon polly apply to Transcribe or Translate?

No. The skill states that it is not meant for Transcribe, Translate or Bedrock-only questions.

### What language and SDK are the examples in?

The rules apply in any language, but the examples use Python with boto3.

### How do I install Amazon polly in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/amazon-polly to use it in all your projects, or to .claude/skills/amazon-polly in one project.

### Does Amazon polly run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Amazon polly?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Amazon polly?

The closest alternatives to Amazon polly are Cascading voice agent, Reachy voice assistant, Copilot SDK, Skill creator and Python pypi package builder.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Cascading voice agent](https://ai-powered.com/skills/cascading-voice-agent): Cascading voice agent is an open-source agent skill for design and media.
- [Reachy voice assistant](https://ai-powered.com/skills/reachy-voice-assistant): Reachy voice assistant is an open-source agent skill for design and media.
- [Copilot SDK](https://ai-powered.com/skills/copilot-sdk-microsoft): Copilot SDK is an open-source agent skill for developer tools.
- [Skill creator](https://ai-powered.com/skills/skill-creator): Skill creator is a free agent skill for ai models and llm tooling.
- [Python pypi package builder](https://ai-powered.com/skills/python-pypi-package-builder): Python pypi package builder is an open-source agent skill for developer tools.
- [Brand guidelines](https://ai-powered.com/skills/brand-guidelines-getsentry): Brand guidelines is an open-source agent skill for developer tools.
- [Build si agent](https://ai-powered.com/skills/build-si-agent): Build si agent is an open-source agent skill for developer tools.
- [Foundation models](https://ai-powered.com/skills/foundation-models): Foundation models is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/amazon-polly
