record_speech_finals
record_speech_finals
Keep each call’s recognizer finals, with their word confidences, for tool handlers to
read with speech_finals(). A final is what the recognizer heard for
one turn of the caller’s, from the platform’s ai.speech_detect event. Its words are
as heard, before hearing hints and number formatting change the text, so a handler
can ask the caller again about a word the recognizer wasn’t sure of, such as a letter
of a spelled name.
Like on_ai_event(), it sets the call’s event_webhook_url to the
agent’s /ai_events endpoint, unless you set it yourself, and needs the agent’s own
web server. A call with redact_prompt set sends no finals unless debug is on.
Parameters
max_calls
The most calls to keep finals for. The oldest call’s finals go first.
max_finals
The most finals to keep for one call.
Returns
AgentBase — Self for method chaining.