volume

View as MarkdownOpen in Claude

Adjust the prompt playback volume.

Parameters

volume
floatRequired

Volume adjustment in dB. Range: -40.0 to 40.0.

Returns

dict — Server acknowledgment.

Example

1from signalwire.relay import RelayClient
2
3client = RelayClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7 contexts=["default"],
8)
9
10@client.on_call
11async def handle_call(call):
12 await call.answer()
13 action = await call.play_and_collect(
14 media=[{"type": "tts", "text": "Press 1 for sales, 2 for support."}],
15 collect={"digits": {"max": 1, "digit_timeout": 5.0}},
16 )
17
18 # Increase prompt volume
19 await action.volume(10.0)
20
21client.run()