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

from signalwire.relay import RelayClient
client = RelayClient(
project="your-project-id",
token="your-api-token",
contexts=["default"],
)
@client.on_call
async def handle_call(call):
await call.answer()
action = await call.play_and_collect(
media=[{"type": "tts", "params": {"text": "Press 1 for sales, 2 for support."}}],
collect={"digits": {"max": 1, "digit_timeout": 5.0}},
)
# Increase prompt volume
await action.volume(10.0)
client.run()