Skip to main content
Turn Detection identifies when a speaker has finished their conversational turn and it’s appropriate for an AI to respond. It solves a critical problem in voice AI: respond too early and you interrupt the speaker; wait too long and the conversation feels awkward.

Two Paths in Vision Agents

Turn detection works differently depending on your setup:
Custom pipeline:  Call audio → STT or TurnDetector → turn signals → LLM
Realtime mode:      Call audio ↔ Realtime API

1. Provider-built-in (STT output stream)

Many STT plugins emit TurnStarted and TurnEnded signals on their output stream. Turn detection happens inside the provider API — no separate plugin needed.
from vision_agents.core import Agent, User
from vision_agents.plugins import deepgram, gemini, getstream, inworld

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Assistant", id="agent"),
    instructions="You are a helpful voice assistant.",
    llm=gemini.LLM(),
    stt=deepgram.STT(eager_turn_detection=True),  # built-in turns; eager = lower latency
    tts=inworld.TTS(),
)

2. External plugin

When your STT plugin has no built-in turn detection, add a TurnDetector plugin:
from vision_agents.plugins import smart_turn

agent = Agent(
    ...,
    stt=fast_whisper.STT(),
    turn_detection=smart_turn.TurnDetection(),
)
External plugins use Silero VAD plus neural models to predict turn completion — see Smart Turn and Vogent.

Turn Detection vs VAD

VADTurn Detection
Question”Is someone speaking?""Has the speaker finished?”
OutputSpeech start/end timestampsTurnStarted / TurnEnded turn signals
IntelligenceSimple audio analysisProvider API or neural turn models
Best forDetecting presenceKnowing when to respond

STT Plugins with Built-in Turn Detection

STT PluginTurn Detection
DeepgramAlways on; set eager_turn_detection=True for speculative early turns
ElevenLabsBuilt-in via VAD commit strategy
CartesiaBuilt-in; eager by default
AssemblyAIBuilt-in
SarvamBuilt-in via VAD events
STT plugins without turn detection (Fast-Whisper, Wizper, Fish, Mistral, AWS) need an external plugin or fall back to using the final transcript as the end-of-turn signal.

External Turn Detection Plugins

PluginDescription
Smart TurnCombines Silero VAD, Whisper features, and neural turn completion models
VogentNeural turn detection with high accuracy prediction
For Realtime APIs (OpenAI, Gemini, AWS Bedrock, Qwen, xAI, Inworld), turn detection is built-in at the model level — no separate plugin needed. See Voice Agents — Realtime Mode.
When an STT plugin provides built-in turn detection (stt.turn_detection is True), the Agent automatically ignores any external TurnDetector plugin to prevent conflicts.

SDK Behavior

  • TurnStarted — triggers barge-in interrupt in the transcribing flow
  • TurnEnded(eager=True) — starts speculative LLM work for lower latency
  • TurnEnded(eager=False) — confirms the turn is complete
  • Pipeline signals (TurnStarted/TurnEnded on the STT output stream) are distinct from agent events (UserTurnStartedEvent, UserTurnEndedEvent)

Next Steps

Interruption Handling

Setup, tuning, and troubleshooting

Voice Agents

Wire turn detection into a pipeline

Smart Turn

Configure the Smart Turn plugin

Vogent

Alternative turn detection option