Skip to main content

Overview

AWSPollyTTSService provides high-quality text-to-speech synthesis through Amazon Polly with support for standard, neural, and generative engines. The service offers extensive language support, SSML features, and voice customization options including prosody controls for pitch, rate, and volume.

AWS Polly API Reference

Pipecat’s API methods for AWS Polly integration

Example Implementation

Complete example with generative engine

AWS Polly Documentation

Official AWS Polly documentation and features

Voice Samples

Browse available voices and languages

Installation

To use AWS Polly services, install the required dependencies:

Prerequisites

AWS Account Setup

Before using AWS Polly TTS services, you need:
  1. AWS Account: Sign up at AWS Console
  2. IAM User: Create an IAM user with Polly permissions
  3. Access Keys: Generate access key ID and secret access key
  4. Voice Selection: Choose from available voices in the voice list

Required Environment Variables

  • AWS_ACCESS_KEY_ID: Your AWS access key ID
  • AWS_SECRET_ACCESS_KEY: Your AWS secret access key
  • AWS_SESSION_TOKEN: Session token (if using temporary credentials)
  • AWS_REGION: AWS region (defaults to “us-east-1”)

Configuration

AWSPollyTTSService

str
default:"None"
AWS secret access key. If None, falls back to environment variables and the default botocore credential chain (instance profiles, IRSA, ECS task roles, SSO, etc.).
str
default:"None"
AWS access key ID. Same fallback behaviour as api_key.
str
default:"None"
AWS session token for temporary credentials.
str
default:"None"
AWS region for Polly service. Defaults to us-east-1 if not set via environment variable.
str
default:"Joanna"
deprecated
Voice ID to use for synthesis. Deprecated in v0.0.105. Use settings=AWSPollyTTSService.Settings(voice=...) instead.
int
default:"None"
Output audio sample rate in Hz. When None, uses the pipeline’s configured sample rate. AWS Polly internally synthesizes at 16kHz and resamples to the target rate.
InputParams
default:"None"
deprecated
Deprecated in v0.0.105. Use settings=AWSPollyTTSService.Settings(...) instead.
AWSPollyTTSService.Settings
default:"None"
Runtime-configurable settings. See Settings below.

Settings

Runtime-configurable settings passed via the settings constructor argument using AWSPollyTTSService.Settings(...). These can be updated mid-conversation with TTSUpdateSettingsFrame. See Service Settings for details.

Usage

Basic Setup

With Voice Customization

The InputParams / params= pattern is deprecated as of v0.0.105. Use Settings / settings= instead. See the Service Settings guide for migration details.

Notes

  • Engine selection: AWS Polly supports "standard", "neural", and "generative" engines. Not all voices support all engines. Check the AWS voice list for compatibility.
  • Pitch control: The pitch parameter only works with the "standard" engine. Neural and generative engines ignore it.
  • Audio resampling: Polly synthesizes PCM at 16kHz internally. The service automatically resamples to match your pipeline’s sample rate.