WebsocketAudioAdapter

class WebsocketAudioAdapter(RealtimeObserver)

update

async def update(response: dict[str, Any]) -> None

Receive events from the OpenAI Realtime API, send audio back to websocket.

handle_speech_started_event

async def handle_speech_started_event() -> None

Handle interruption when the caller’s speech starts.

initialize_session

async def initialize_session() -> None

Control initial session with OpenAI.