adrivelasco
12/04/2025, 12:45 AMtranscriptType="final" and model-output, and conversation-update but none of them seem to be reliable as they're being sent multiple times within the same AI turn.
This is an example of model-output events:
{
"message": {
"timestamp": 1764796598671,
"type": "model-output",
"output": " It’s a photo of a family hanging a framed picture on a light-colored wall, working together as a team.<flush />",
...
}
}
{
"message": {
"timestamp": 1764796599003,
"type": "model-output",
"output": " What kinds of things do you usually notice when people are decorating their homes?<flush />",
...
}
}
As you can see, none of them indicates which one is the last one before the user starts speaking.Vapi Support Bot
12/04/2025, 12:46 AMspeech-update event, which signals the assistant is starting to speak:
json
{
"message": {
"type": "speech-update",
"status": "started",
"role": "assistant"
}
}
When you receive this event, you can treat it as the end of the model's output for that turn. This approach is recommended in the documentation for tracking the assistant's speaking state and is more reliable than using model-output alone.
Source: [Vapi Server Events Documentation](https://docs.vapi.ai/server-url/events)adrivelasco
12/04/2025, 12:56 AMTremix
12/04/2025, 6:53 AMadrivelasco
12/04/2025, 1:15 PMspeech-update seems to work as I was expecting although it does with a bit of delay as it runs when the assistant ends to speak and not when the LLM output last tokens.adrivelasco
12/04/2025, 4:20 PMspeech-update is that it's sent too late for me (when TTS finishes) and I would like to run a process when I know the last LLM output happened.Tremix
12/05/2025, 7:06 AMChiranjeet Mishra
12/05/2025, 9:47 PMmodel-output, conversation-update, speech-update) can fire multiple times within a single turn or occur only after TTS finishes, which is why you're seeing inconsistency.
The recommended approach is:
- Use conversation-update events if you want the completed turn with full message history.
- Use speech-update if you want to detect when the assistant begins speaking its final response for that turn (the started event fires once per turn).
- If you need to trigger logic exactly when the last LLM token is generated, the best option today is to implement your own buffer tracking on the server side and treat the last model-output event before the next speech-update as the true end of the LLM turn.
This combination is currently the most reliable way to detect end-of-turn behavior before TTS begins.