> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# play

> Add a play verb to play audio or text-to-speech.

Add a `play` verb to the main section. Plays audio from a URL or a list of URLs.

## **Parameters**

**`config`** `Record<string, unknown>` — required

SWML play verb configuration object. Keys are passed through to the SWML
document as-is (snake\_case). Exactly one of `url` or `urls` must be provided.

| Key            | Type       | Description                                            |
| -------------- | ---------- | ------------------------------------------------------ |
| `url`          | `string`   | Single URL to play. Supports the `say:` prefix for TTS |
| `urls`         | `string[]` | List of URLs to play in sequence                       |
| `volume`       | `number`   | Volume adjustment (-40 to 40 dB)                       |
| `say_voice`    | `string`   | Voice name for text-to-speech                          |
| `say_language` | `string`   | Language code for TTS (e.g., `"en-US"`)                |
| `say_gender`   | `string`   | Gender for TTS voice selection                         |
| `auto_answer`  | `boolean`  | Auto-answer the call before playing                    |

---

## **Returns**

`this` -- The builder instance for method chaining.

## **Example**

```typescript {5}
import { SwmlBuilder } from '@signalwire/sdk';

const builder = new SwmlBuilder();
builder.addVerb('answer', {});
builder.play({ url: 'https://example.com/audio.mp3' });
```