Send Audio • AI Agent SDK
send_audio: Send audio data (sync wrapper).
send_audio
Method
</div>
This is a method of the RealtimeAgent class in the realtime_agent module.
Send audio data (sync wrapper).
Signature
def send_audio(audio_data: bytes) -> boolParameters
ParamField
bytesRaw audio bytes (PCM16 format)
Returns
ResponseField
boolTrue if sent successfully
Uses
asyncio.get_running_loopasyncio.get_event_looploop.run_until_completeasend_audioasyncio.new_event_loopasyncio.set_event_loop
Source
View on GitHubpraisonaiagents/agent/realtime_agent.py at line 373