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

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