***

title: play
slug: /reference/typescript/agents/swml-builder/play
description: Add a play verb to play audio or text-to-speech.
max-toc-depth: 3
---------------------

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

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

## **Parameters**

<ParamField path="config" type="Record<string, unknown>" required={true} toc={true}>
  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                    |
</ParamField>

## **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' });
```