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 105 MB model file that contains Silero VAD v6.2, a student model (a Whisper Base encoder trained to reproduce the end-of-turn scores of p99lab’s turn-1), 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 v1.1 (English, 2,288 turns) version 0.2.0 makes 23.5% false cut-offs at a 300 ms latency budget, against 32.5% for version 0.1.0, which used Smart Turn v3.2 in place of the student. It is behind the best hosted models and weakest on short turns. The blend’s weights were fitted on held-out audio, not on the benchmark; 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; the analyzer scores less often on machines that cannot 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, the student model and the blend are Apache-2.0. The model file also contains the unmodified weights of Silero VAD (MIT) and turn-1-mini (Apache-2.0), and the student was initialised from OpenAI’s Whisper Base (MIT) and trained on scores from turn-1 (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.75"
The turn ends when the blended probability is above this.
float
default:"160"
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.