playBackgroundFile

View as MarkdownOpen in Claude

Play an audio file in the background while the conversation continues.

Parameters

filename
stringRequired

URL of the audio file to play (e.g., "https://example.com/hold-music.mp3").

wait
booleanDefaults to false

When true, suppresses the agent’s attention-getting behavior during playback. The agent will not try to re-engage the user while the file is playing.

Returns

FunctionResultthis, for chaining.

Example

import { FunctionResult } from '@signalwire/sdk';
const result = new FunctionResult()
.playBackgroundFile('https://example.com/hold-music.mp3');