replica.started_speaking/stopped_speaking event is broadcasted by Tavus at specific times: conversation.replica.started_speaking means the replica has just started speaking. conversation.replica.stopped_speaking means the replica has just stopped speaking.
When the replica.stopped_speaking event is sent, the event’s properties object will include:
duration field indicating how long the replica was speaking for in seconds. This value may also be null.interrupted field (true/false) indicating whether the replica was interrupted by the user while speaking, or finished speaking naturally.inference_id can be used to correlate other events and tie things like conversation.utterance or tool_call together.
This event includes a seq field for global ordering and a turn_idx field to identify which conversational turn the speaking state change belongs to. See Event Ordering and Turn Tracking for details.Message type indicates what product this event will be used for. In this case, the message_type will be conversation
"conversation"
This event occurs when the replica either starts actually speaking audio, or stops actually speaking audio.
conversation.replica.started_speaking, conversation.replica.stopped_speaking "conversation.replica.started_speaking"
A globally monotonic sequence number assigned to each event. Use this to determine the ordering of events — a higher seq means the event was sent later. This is useful for reconciling events that may arrive out of order.
42
The conversation turn index. This value increments each time a conversation.respond interaction is received, and groups all events that belong to the same conversational turn. Use this to correlate events (utterances, tool calls, speaking state changes, etc.) that are part of the same turn.
3