Skip to main content
Rarely needed. This callback fires for every utterance spoken by the caller. 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 caller speech is detected. The event contains what the caller said and an utterance_id that distinguishes new utterances from updates to existing ones. As transcription progresses, you may receive multiple events with the same utterance_id. Usually these updates append new words, but there can be slight corrections to previously transcribed words. For example:
  • "Hi." — utterance_id='0'
  • "I am going to the store" — utterance_id='1'
  • "I'm going to the store and" — utterance_id='1' (update to the same utterance)
The CallerSpeechEvent is a pydantic model imported from guava.events:

Signature

signature
Return value: None

Example

controller.py