experimental
autogen.agentchat.realtime.experimental.AudioObserver
AudioObserver
Observer for user voice input
Observer for user voice input
Parameters:Name | Description |
---|---|
logger | Type: ForwardRef(‘Logger’) | None Default: None |
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.
Name | Description |
---|---|
event | The event from the OpenAI Realtime API. Type: RealtimeEvent |
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.
Name | Description |
---|---|
agent | The realtime agent attached to the observer. Type: RealtimeAgent |
run_loop
Run the observer loop.
wait_for_ready
Get the event that is set when the observer is ready.