stop
Stop recording immediately. The recording file becomes available.
Returns
dict — Server acknowledgment.
Stop recording immediately. The recording file becomes available.
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.record(audio={"direction": "both", "format": "wav"}) 14 15 # Stop recording early 16 await action.stop() 17 18 client.run()