Turn-Taking (VIVA SDK)
Predict when the user has finished speaking, so your voice AI agent responds at the right moment.
Turn-Taking (TT) predicts when the user has finished their turn in a human-to-bot conversation, so your agent can respond without awkward pauses and without cutting the user off. It replaces silence-based end-of-turn detection with a small model that listens to how the user speaks.
The model uses audio only. It analyses acoustic and prosodic cues such as changes in pitch, energy and intonation, pauses and speaking rate. For example, a drop in energy followed by a pause is a typical turn-ending cue. For the technical background, see the blog posts Turn-taking for voice AI and Krisp Turn-Taking v2.
Choose how to detect turns
Krisp offers turn detection in two places:
| VIVA SDK Turn-Taking | Krisp API: STT for Agents | |
|---|---|---|
| Where it runs | On your servers, inside your audio pipeline | In Krisp's cloud, as part of speech-to-text |
| What you get | An end-of-turn probability for every frame; you decide when the turn ends | A turn event on the transcript stream when the turn ends |
| Voice activity | You supply it from your own VAD (TTv3) | Built in |
| Tuning | Your probability threshold | turn.sensitivity, turn.max_silence, turn.silence_validation |
| Use it when | You run your own STT, or you use a framework such as Pipecat | You also want Krisp's transcripts |
How the SDK model works
This section follows TTv3, the current version: model krisp-viva-tp-v3, introduced in VIVA SDK v9.17.0 (C/C++) and the matching Python, Node.js, Go and Rust releases. See the migration guide if you use TTv2.
- Clean the audio first. Deploy TT on the output of Voice Isolation. Background voices otherwise look like the user still speaking.
- Detect voice activity. Run your VAD on each frame. TTv3 uses your VAD's decision instead of its own.
- Process each frame. Pass the audio frame, whether voice was detected, and whether the bot is currently speaking. Setting
botSpeakingto true resets the model's state between turns. - Compare with a threshold. The model returns the probability, between 0 and 1, that the user has finished. Until the first result is ready, it returns the previous value.
The input frame duration is set in the session config (the official samples use 20 ms frames), and the TTv3 model krisp-viva-tp-v3 works with all languages.
Parameters
| Parameter | Values | Effect |
|---|---|---|
inputSamples | One audio frame | The audio to analyse. |
voiceDetected | true / false | Your VAD's decision for this frame. |
botSpeaking | true / false | Whether the bot is speaking. true resets the internal state between turns. |
| Threshold | 0.3 – 0.5 (recommended) | Lower values (0.3) end turns sooner but cause more false end-of-turn decisions. Higher values (0.5) wait slightly longer and make fewer mistakes. |
Tradeoffs
- A lower threshold gives faster responses, but the agent may start talking while the user only pauses mid-sentence.
- A higher threshold gives fewer interruptions, but the user waits slightly longer for the reply.
- Clean audio matters more than the threshold. Without Voice Isolation in front, background speech keeps the probability low and delays the turn end.
Code
- Python and C++: see Turn-Taking in Getting Started.
- Pipecat: use
KrispVivaTurnas described in the Pipecat integration. - Upgrading from TTv2: see the TTv3 migration guide.
Troubleshooting
- The agent interrupts the user. Raise the threshold toward 0.5, and check that Voice Isolation runs before TT.
- The agent answers late. Lower the threshold toward 0.3, and check that
botSpeakingis reset to false when the bot stops speaking.
Updated 3 days ago

