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

# Turn Detector

> Python API reference for the unified turn detector.

<Card title="Usage guide" icon="book" href="/runtime-sdk/plugins/turn-detection" horizontal>
  Setup, environment variables, and Python/JavaScript/Go usage examples.
</Card>

## TurnDetector

Managed end-of-turn detection that predicts when the user has finished speaking,
using the Echo turn-detection models. Choose it to avoid cutting users off
mid-thought without hand-tuning silence timeouts.

Runs on ZeroRuntime's managed inference and is billed to your ZeroRuntime
account, so no provider API key is needed.

`model` chooses the backend: echo-large, echo-omni, echo-small.

```python theme={null}
from zeroruntime.inference import TurnDetector  # same fields, through the gateway, no vendor key
```

### Fields

<ParamField path="model" type="str" default="echo-large">
  Turn-detection model: "echo-small" for lowest latency, "echo-large" for higher accuracy, or "echo-omni". Defaults to 'echo-large'.
</ParamField>

<ParamField path="channels" type="Optional[int]" default="UNSET">
  Number of audio channels the agent receives. Leave unset to detect it automatically. Defaults to None (not set).
</ParamField>

<ParamField path="host" type="Optional[str]" default="UNSET">
  Override the service host to connect to. Leave unset to use the managed service. Defaults to None (not set).
</ParamField>

<ParamField path="language" type="Optional[str]" default="UNSET">
  Language code of the conversation, e.g. "en". Leave unset to let the model handle it. Defaults to None (not set).
</ParamField>

<ParamField path="sample_rate" type="Optional[int]" default="UNSET">
  Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
</ParamField>

<ParamField path="timeout" type="float" default="UNSET">
  Seconds to wait for a turn prediction before giving up and continuing without it. Defaults to 2.0.
</ParamField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.