***

title: play
slug: /reference/python/rest/calling/play
description: Play audio or text-to-speech on an active call via REST.
max-toc-depth: 3
---------------------

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

[play-pause]: /docs/server-sdks/reference/python/rest/calling/play-pause

[play-resume]: /docs/server-sdks/reference/python/rest/calling/play-resume

[play-stop]: /docs/server-sdks/reference/python/rest/calling/play-stop

[play-volume]: /docs/server-sdks/reference/python/rest/calling/play-volume

Play audio or text-to-speech on an active call. Returns a `control_id` that can be
used with [`play_pause()`][play-pause],
[`play_resume()`][play-resume],
[`play_stop()`][play-stop], and
[`play_volume()`][play-volume] to manage
the playback.

<EndpointSchemaSnippet endpoint="POST /api/calling/calls" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /api/calling/calls" />

## **Examples**

### Play TTS

```python {10}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

# Play TTS
result = client.calling.play(
    call_id="call-id-xxx",
    play=[{"type": "tts", "text": "Hello from the REST API!"}]
)
control_id = result.get("control_id")
```

### Play Audio File

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

client.calling.play(
    call_id="call-id-xxx",
    play=[{"type": "audio", "url": "https://example.com/greeting.mp3"}]
)
```

### Play Multiple Items

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

client.calling.play(
    call_id="call-id-xxx",
    play=[
        {"type": "tts", "text": "Please hold while we connect you."},
        {"type": "silence", "duration": 1},
        {"type": "audio", "url": "https://example.com/hold-music.mp3"},
    ]
)
```