Skip to main content
Community-maintained integration. This service is built and maintained by adhiraj4802. Pipecat does not test or officially support it. Please report issues and request changes on the source repository. Learn more about community integrations.

Overview

TurnBlendAnalyzer is a turn analyzer backed by turn-blend.onnx, a single 56 MB model file that contains Silero VAD v6.2, Smart Turn v3.2, p99lab’s turn-1-mini and a logistic blend of the two end-of-turn scores with the elapsed silence. It runs locally on the CPU, needs no API key or GPU, and decides from audio alone. On LiveKit’s eot-bench (English, 400 turns, cross-validated) the blend makes fewer false cut-offs than either model inside it: 20.1% at a 300 ms latency budget, against 22.6% for turn-1-mini and 35.2% for Smart Turn v3.2. It is behind the best hosted models. The blend’s weights were fitted on that same dataset, so expect a smaller gain on other audio; the benchmark page has the full tables, the latency measurements and the limits.
English only, because turn-1-mini is English only. For other languages use Pipecat’s built-in Smart Turn.

Source Repository

Source code, example bot, and issues for the Turn Blend integration

Benchmarks

eot-bench results and CPU latency measurements

Installation

This is a community-maintained package distributed separately from pipecat-ai:

Prerequisites

  • Pipecat 1.0 or later (tested with pipecat-ai 1.16.0)
  • 16 kHz input audio: set PipelineParams(audio_in_sample_rate=16000)
  • 2 or more CPU threads for the model to keep up in real time
No account, API key or environment variable is required. The model is downloaded from the repository’s releases on first use, checked against its SHA-256 and cached in ~/.cache/turn-blend. The plugin code and blend are Apache-2.0. The model file also contains the unmodified weights of Silero VAD (MIT), Smart Turn v3.2 (BSD 2-Clause) and turn-1-mini (Apache-2.0); all of those licences apply to it.

Usage

Pipecat’s VAD still opens the user turn and handles interruptions. The analyzer ends the turn when the blend commits, or when the silence timeout runs out.

Configuration

str
default:"None"
Path to turn-blend.onnx. If omitted, the model is downloaded on first use.
int
default:"4"
CPU threads for the model.
Callable
default:"None"
Callback with the result of each ended turn: the reason (commit or timeout), the silence waited, the detection delay and the three scores. The same dict is kept in last_result.
float
default:"0.85"
The turn ends when the blended probability is above this.
float
default:"320"
Silence required before the blend may end the turn.
float
default:"2"
Number of consecutive scores above the threshold required.
float
default:"3.0"
Silence that ends the turn even if the blend never commits.
The model has 16 settings in all, including its VAD thresholds and the blend weights. Each can be passed as a keyword argument, changed later with turn.detector.configure(...), or read from a JSON file and TURN_BLEND_<SETTING> environment variables with load_settings(). The README lists them.

Compatibility

Last tested with Pipecat v1.16.0.