Skip to content
Skill

Amazon polly

Guides an agent through building Amazon Polly text-to-speech code correctly

Amazon polly is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
469
Last commit
License
MIT-0
Listing updated

Similar skills

About Amazon polly

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.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (22 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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.

Claude Code docs on skills

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

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.

Codex docs on skills

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

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.

Cursor docs on skills

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

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.

Gemini CLI docs on skills

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

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.

VS Code docs on skills

Get the folder:

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.

The SKILL.md format

What it does

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

Amazon polly 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.

More from aws-samples/amazon-ai-samples

  1. Sets up Claude Code, Codex and OpenCode to run Amazon Ergo 1.0 on Bedrock

    • Open source
    • 469 GitHub stars
    • Cloud and infrastructure
  2. Migrates Gemini Python code and prompts to Amazon Nova 2 Lite on Bedrock

    • Open source
    • 469 GitHub stars
    • AI models and LLM tooling
  3. Ports prompts from other LLMs to Amazon Nova and checks quality with evaluation runs

    • Open source
    • 469 GitHub stars
    • AI models and LLM tooling
  4. Rewrites and optimizes prompts specifically for Amazon Nova 1 models

    • Open source
    • 469 GitHub stars
    • AI models and LLM tooling
  5. Rewrites and tunes prompts for Amazon Nova 2 Lite, including multimodal inputs

    • Open source
    • 469 GitHub stars
    • Design and media
  6. Writes and reviews system prompts and tool descriptions for Nova Sonic 2.5 voice agents

    • Open source
    • 469 GitHub stars
    • AI models and LLM tooling