> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Polly

> Use the AWS Polly text-to-speech plugin in a Zero Runtime pipeline. Setup and usage in Python and JavaScript.

AWS Polly is a **text-to-speech** plugin. It synthesizes the agent's text responses into
natural-sounding speech using Amazon Polly's neural, standard, generative, and long-form voice engines.

## Setup

Set your AWS access key in the worker environment. Get your access keys from the [AWS console](https://console.aws.amazon.com/):

```bash theme={null}
export AWS_ACCESS_KEY_ID=<key>
```

## Usage

Import the plugin and pass it to the pipeline's `tts` slot.

<CodeGroup>
  ```python Python theme={null}
  from zeroruntime.plugins import AWSPollyTTS

  tts = AWSPollyTTS()

  # Pipeline(tts=tts, ...)
  ```

  ```typescript Node JS theme={null}
  import { AWSPollyTTS } from '@zeroruntime/js-sdk/plugins';

  const tts = AWSPollyTTS();

  // Pipeline({ tts, ... })
  ```
</CodeGroup>

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `aws_access_key_id` | `str \| None` | `None` | AWS access key ID. Falls back to the `AWS_ACCESS_KEY_ID` environment variable when unset. |
| `aws_secret_access_key` | `str \| None` | `None` | AWS secret access key paired with `aws_access_key_id`. Falls back to the `AWS_SECRET_ACCESS_KEY` environment variable when unset. |
| `aws_session_token` | `str \| None` | `None` | Temporary session token for short-lived IAM role credentials (e.g. from `sts:AssumeRole`). Falls back to the `AWS_SESSION_TOKEN` environment variable when unset. Omit for long-term credentials. |
| `region` | `str` | `"us-east-1"` | AWS region hosting the Polly endpoint, e.g. `"us-east-1"`, `"eu-west-1"`, `"ap-southeast-1"`. |
| `voice` | `str` | `"Joanna"` | Polly voice ID to use for synthesis (US English, female, neural). Other popular options include `"Matthew"` (US English, male), `"Amy"` (British English, female), `"Brian"` (British English, male), and `"Celine"` (French, female). See the [AWS Polly voice list](https://docs.aws.amazon.com/polly/latest/dg/voicelist.html) for the full catalogue. |
| `engine` | `str` | `"neural"` | Polly synthesis engine. One of `"neural"` (high-quality neural TTS; supports a subset of voices), `"standard"` (concatenative synthesis; broadest voice support), `"generative"` (expressive speech; select voices only), or `"long-form"` (optimized for longer text passages; select voices only). |
| `speed` | `float` | `1.0` | Playback rate multiplier (`1.0` is normal speed). |
| `pitch` | `float` | `0.0` | Pitch adjustment in semitones (`0.0` is normal). |

Synthesized audio is streamed back to the caller after the
[LLM](/runtime-sdk/plugins/overview) produces a response.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.