volume
Adjust the playback volume.
Parameters
volume
Volume adjustment in dB. Range: -40.0 to 40.0.
Returns
dict — Server acknowledgment.
Adjust the playback volume.
Volume adjustment in dB. Range: -40.0 to 40.0.
dict — Server acknowledgment.
1 from signalwire.relay import RelayClient 2 3 client = 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 11 async def handle_call(call): 12 await call.answer() 13 action = await call.play( 14 [{"type": "audio", "url": "https://example.com/hold-music.mp3"}], 15 loop=0, 16 ) 17 18 # Increase volume 19 await action.volume(10.0) 20 21 # Decrease volume 22 await action.volume(-5.0) 23 24 client.run()