> ## Documentation Index
> Fetch the complete documentation index at: https://visionagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart Turn

Smart Turn uses neural models (Silero VAD + Whisper features) to detect when a speaker has completed their turn. Provides natural conversation flow without relying solely on silence detection.

<Info>
  Vision Agents requires a [Stream](https://getstream.io/try-for-free/) account
  for real-time transport. Most providers offer free tiers to get started.
</Info>

## Installation

```sh theme={null}
uv add "vision-agents[smart_turn]"
```

## Quick Start

```python theme={null}
from vision_agents.core import Agent, User
from vision_agents.plugins import smart_turn, gemini, deepgram, elevenlabs, getstream

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Assistant", id="agent"),
    instructions="You are a helpful assistant.",
    llm=gemini.LLM("gemini-3-flash-preview"),
    stt=deepgram.STT(),
    tts=elevenlabs.TTS(),
    turn_detection=smart_turn.TurnDetection(),
)
```

<Note>Models download automatically on first use.</Note>

## Parameters

| Name                   | Type    | Default | Description                     |
| ---------------------- | ------- | ------- | ------------------------------- |
| `buffer_in_seconds`    | `float` | `2.0`   | Audio buffer duration           |
| `confidence_threshold` | `float` | `0.5`   | Turn completion threshold (0-1) |
| `sample_rate`          | `int`   | `16000` | Audio sample rate               |

## Events

```python theme={null}
from vision_agents.core.turn_detection.events import TurnStartedEvent, TurnEndedEvent

@turn_detection.events.subscribe
async def on_turn_ended(event: TurnEndedEvent):
    print(f"User finished: confidence={event.confidence}")
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Build a Voice Agent" icon="microphone" href="/introduction/voice-agents">
    Get started with voice
  </Card>

  <Card title="Build a Video Agent" icon="video" href="/introduction/video-agents">
    Add video processing
  </Card>
</CardGroup>
