Skip to main content
Rarely needed. This callback fires for every utterance spoken by the agent. Most implementations will not need it and should instead rely on higher-level callbacks like on_question or on_task_complete. It is most useful for implementing call surveillance or real-time transcription logging.
Register a handler to receive a callback whenever the agent speaks. The event contains what the agent said and whether it was interrupted by the caller.The AgentSpeechEvent is a pydantic model imported from guava.events:

Signature

signature
Return value: None

Example

controller.py