Skip to main content

AudioObserver

Observer for user voice input Observer for user voice input Parameters:

Instance Methods

initialize_session

No need to initialize session from this observer

on_close

Handle close of RealtimeClient.

on_event

Observe voice input events from the Realtime.
Parameters:

run

Run the observer with the agent.
When implementing, be sure to call self._ready_event.set() when the observer is ready to process events.
Parameters:

run_loop

Run the observer loop.

wait_for_ready

Get the event that is set when the observer is ready.