# Polly avatar

> Polly avatar is an open-source agent skill for cloud and infrastructure. Runs a conversational 3D avatar with Polly viseme lip-sync and a Bedrock agent. 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/polly-avatar
- **Repository:** https://github.com/aws-samples/amazon-ai-samples
- **GitHub stars:** 469
- **License:** MIT-0
- **Skill name:** polly-avatar
- **Collection:** https://github.com/aws-samples/amazon-ai-samples
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure), [design and media](https://ai-powered.com/categories/design-and-media), [audio generation](https://ai-powered.com/categories/audio-generation)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through setting up the Polly Avatar demo, a browser-based 3D character that listens to speech, answers through a Bedrock-hosted Strands agent, and speaks with mouth movements driven by Amazon Polly viseme speech marks. It covers running the React and Three.js client alongside a Node and TypeScript WebSocket server locally, plus deploying the stack to AWS with CDK, including the cost and permission checks the workflow requires before anything is created.

The skill sets out a safety sequence for AWS-hosted mode: it states the account, Region and expected monthly cost, asks for confirmation, and explains that teardown is forced and keeps the Cognito user pool. It also lists smoke tests for credentials, Polly output and the agent, along with known pitfalls such as engines that do not emit visemes, SSML elements that fail on neural voices, and an arm64 image requirement.

It also explains how to swap in a custom glTF or GLB avatar by mapping morph targets to viseme names, and how to build lip-sync from Polly speech marks with audio-clock timing and blended mouth shapes. Expect to work with Node.js 20 or later, AWS credentials with Bedrock model access, and a container runtime when deploying.

## When your agent uses it

> Set up, run locally, deploy to AWS (CDK), debug, extend, and tear down the Polly Avatar demo in text-to-speech/use-cases/polly-avatar — a conversational 3D avatar with real-time lip-sync driven by Amazon Polly viseme speech marks, Amazon Transcribe streaming STT, and a Strands agent on Amazon Bedrock (React/Three.js client, Node/TypeScript WebSocket server, Cognito/CloudFront/Fargate infrastructure). Use when asked to run or deploy the avatar, fix lip-sync, audio, auth, or deployment problems, change the voice/model/avatar, upload a custom glTF/GLB model, or build lip-sync from Polly visemes.

## 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/polly-avatar)
- [License: MIT-0](https://github.com/aws-samples/amazon-ai-samples/tree/HEAD/text-to-speech/skills/polly-avatar)

## Features

- **Local development setup:** Steps to install and run the client and server with auth disabled for development only.
- **Smoke test checks:** Commands that verify AWS credentials, Polly audio and visemes, and the Strands agent.
- **AWS CDK deployment:** Guidance for deploying and tearing down the Cognito, CloudFront, and Fargate infrastructure with safety gates.
- **Viseme lip-sync guidance:** Rules for requesting speech marks, syncing audio, and blending mouth shapes from the playback clock.
- **Custom avatar models:** How to upload a glTF or GLB model and map its morph targets to Polly visemes.
- **Common troubleshooting gotchas:** Notes on engine limits, SSML allowlist, language list generation and image architecture problems.

## Good for

- Run the Polly avatar demo on my laptop for testing
- Deploy the avatar stack to AWS with CDK
- Fix lip-sync that is out of step with the speech
- Swap the avatar for my own GLB model
- Debug a Fargate task that exits with code 255
- Tear down the avatar infrastructure I created

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/polly-avatar` 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/polly-avatar &&
cp -R "$tmp/text-to-speech/skills/polly-avatar" ~/.claude/skills/polly-avatar &&
rm -rf "$tmp"
```

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

### Codex

Copy the skill folder to `~/.agents/skills/polly-avatar` 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/polly-avatar &&
cp -R "$tmp/text-to-speech/skills/polly-avatar" ~/.agents/skills/polly-avatar &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/polly-avatar` 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/polly-avatar &&
cp -R "$tmp/text-to-speech/skills/polly-avatar" ~/.cursor/skills/polly-avatar &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/polly-avatar` 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/polly-avatar
```

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

### VS Code

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

```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/polly-avatar &&
cp -R "$tmp/text-to-speech/skills/polly-avatar" ~/.copilot/skills/polly-avatar &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/polly-avatar` 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/polly-avatar` into your agent's skills folder as `polly-avatar`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does running the avatar locally create AWS resources?

No. Local mode only makes pay-per-use calls to Transcribe, Bedrock and Polly and creates no infrastructure.

### What does the AWS-hosted deployment cost?

The infra README estimates about $75 or more per month at demo scale, mostly from VPC endpoints, the ALB and Fargate.

### Which Polly engine should I use for lip-sync?

Use neural, standard or long-form. Generative and bidirectional streaming do not emit visemes.

### Where is conversation history stored?

By default it is saved locally under server/.sessions/, and the skill says to delete it during cleanup.

### How do I install Polly avatar in Claude Code?

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

### Does Polly avatar 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 Polly avatar?

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 Polly avatar?

The closest alternatives to Polly avatar are Content to audio, Cascading voice agent, Live speech translator, Reachy voice assistant and Text agent to strands voice agent.

## Where this comes from

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

## Alternatives

- [Content to audio](https://ai-powered.com/skills/content-to-audio): Content to audio is an open-source agent skill for design and media.
- [Cascading voice agent](https://ai-powered.com/skills/cascading-voice-agent): Cascading voice agent is an open-source agent skill for design and media.
- [Live speech translator](https://ai-powered.com/skills/live-speech-translator): Live speech translator 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.
- [Text agent to strands voice agent](https://ai-powered.com/skills/text-agent-to-strands-voice-agent): Text agent to strands voice agent is an open-source agent skill for design and media.
- [Talking avatar](https://ai-powered.com/skills/talking-avatar): Talking avatar is an open-source agent skill for design and media.
- [Rails on lambda](https://ai-powered.com/skills/rails-on-lambda): Rails on lambda is an open-source agent skill for cloud and infrastructure.
- [Nemotron voice agent builder](https://ai-powered.com/skills/nemotron-voice-agent-builder): Nemotron voice agent builder is an open-source agent skill for design and media.

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