Interrupt the avatar
When the user starts talking over the avatar, callclear(). It drops the audio that hasn’t played yet, stops the avatar mid-sentence, and resolves with how many milliseconds of the interrupted reply the user heard.
Keep the transcript accurate
Your agent’s model generated the whole reply, but the user only heard part of it. UseheardMs to tell the model what was actually said.
With OpenAI Realtime, truncate the assistant’s item to what was heard:
Speech events
on() returns a function that removes the listener:
LiveAvatar reference.