> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# playAudio

> Play an audio file from a URL on a call.

[playaction]: /docs/server-sdks/reference/typescript/relay/actions

[play]: /docs/server-sdks/reference/typescript/relay/call/play

Play an audio file from a URL on the call. A typed convenience over
[`play()`][play].

## **Parameters**

**`url`** `string` — required

URL of the audio file.

---

**`options`** `object`

Playback options.

---

**`options.volume`** `number`

Volume adjustment in dB, from `-40` to `40`.

---

**`options.onCompleted`** `(event: RelayEvent) => void | Promise<void>`

Callback invoked when the operation reaches a terminal state.

---

## **Returns**

`Promise<`[`PlayAction`][playaction]`>` -- An action handle with `stop()`, `pause()`, `resume()`, `volume()`, and `wait()` methods.

## **Example**

```typescript {11}
import { RelayClient } from '@signalwire/sdk';

const client = new RelayClient({
  project: process.env.SIGNALWIRE_PROJECT_ID!,
  token: process.env.SIGNALWIRE_API_TOKEN!,
  contexts: ['default']
});

client.onCall(async (call) => {
  await call.answer();
  const action = await call.playAudio('https://example.com/hold-music.mp3', { volume: -6 });
  await action.wait();
});

await client.run();
```