# Repository Briefing: TEN-framework/ten-vad
> Source: https://repoforai.com/repo/TEN-framework/ten-vad (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/TEN-framework/ten-vad
- **Official Docs / Website**: https://huggingface.co/TEN-framework/ten-vad
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: C
- **License**: See repository
- **Engineering Health**: B+ (67/100 · Maintenance 35/35 · Adoption 15/25 · Releases 11/20 · License 6/20)
- **Latest Release**: v1.0-ONNX (2025-07-11) — https://github.com/TEN-framework/ten-vad/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI
- **Momentum**: 2,326 ★ total (+1 24h / +6 7d) · 185 forks
- **Topics**: `audio`, `automatic-speech-recognition`, `conversational-ai`, `real-time`, `silero-vad`, `speech`, `speech-processing`, `vad`, `voice-activity-detection`, `voice-agent`, `voice-commands`, `voice-recognition`
- **When to Use**: Best for: Voice agents, streaming ASR, and on-device audio pipelines that need a local speech/non-speech signal and already control resampling and endpointing. Skip if: You need transcription, speaker labels, or turn completion out of the box, or cannot accommodate 16 kHz input and platform-specific native packaging.

## Overview
```text
### Architecture & Core Mechanics
TEN VAD is a local inference component with a C interface in `include/ten_vad.h`, prebuilt platform artifacts under `lib/`, and a separate ONNX path using the model in `src/onnx_model/`. The caller creates a detector with a hop size and threshold, pushes successive blocks of 16 kHz audio, and consumes a speech probability and a binary flag for each frame. Capture, resampling, buffering, and turn policy sit outside the detector.

The integration surface is an in-process library rather than a network service. Python exposes `TenVad`, desktop platforms have C, Java, and Go integration paths, and the web build uses WASM with JavaScript. Python packaging uses setuptools >=70.1 and wheel, while the root `requirements.txt` lists NumPy. The manual ONNX examples have a separate native dependency on ONNX Runtime.

### Key Capabilities & Differentiators
The detector operates at 16 kHz, with optimized hops of 160 or 256 samples (10 or 16 ms). The default threshold of 0.5 converts each score to a speech/non-speech flag; it is a starting point, not a universal operating point. The frame cadence lets a voice pipeline observe short pauses, but those hop durations are not guarantees of end-of-speech latency.

The published precision–recall comparison covers TEN VAD, Silero VAD, and WebRTC VAD on manually labeled audio. A Linux x64 plotting script reproduces the TEN VAD–Silero comparison from the included test set. Reported TEN VAD RTF ranges from 0.0050 on an iPhone 8 to 0.0570 on a Galaxy J6+ in the listed tests. Those results show real-time headroom on the tested devices; they do not establish capacity at a given concurrency.

### Trade-offs & Limitations
On the Xeon Gold 6348, the reported RTF is 0.0086 for TEN VAD versus 0.0127 for Silero VAD. The Linux TEN VAD library is listed at 306 KB versus Silero's 2.16 MB JIT and 2.22 MB ONNX artifacts. That is useful evidence for footprint-sensitive integration, but it is not a like-for-like measurement of total deployed size or peak RAM, and most rows do not include a paired Silero RTF.

The illustrated speech-to-silence example favors TEN VAD over Silero, but neither that example nor a PR curve predicts how often an agent will cut off users in production. Compare alternatives on target audio, measuring false triggers, missed speech, and end-of-turn delay after threshold and hangover tuning. Also budget for resampling non-16 kHz inputs and review the applicable license before shipping: LICENSE and NOTICES are present, but the license type is unspecified in the repository metadata.

### Hardware & Deployment Guide
For Linux Python, `pip install ten-vad` provides the shortest path on x64 or ARM64. The documented 1.0.6.10 ARM64 wheel targets glibc 2.27 or newer and bundles both the model and ONNX Runtime, so it does not need the ONNX Runtime Python package. For manual ONNX builds, use ONNX Runtime >=1.17.1 and pass its extracted root via `--ort-path`. Keep `src/onnx_model/` resolvable when launching the demo from another working directory.

With prebuilt libraries, account for native loading: Linux may need `libc++1`, and Windows needs the DLL beside the executable or on PATH. Check the target ABI rather than assuming uniform binding support; the iOS table lists arm64 and excludes the simulator and iPad. `packaging/Dockerfile` is used to build an ARM64 wheel, not to run an inference service. On 2025-07-11, v1.0 shipped prebuilt cross-platform libraries, while v1.0-ONNX opened the ONNX path and updated the license terms.
```

## Key Capabilities
```text
- Frame interface: 16 kHz input, optimized 160- and 256-sample hops, and per-frame probability plus a binary speech flag
- Native integration: C header and platform libraries for Linux, Windows, macOS, Android, and iOS; WASM for JavaScript on the web
- ONNX execution: model in `src/onnx_model/`; manual examples require ONNX Runtime 1.17.1 or newer
- Reproducible evaluation: labeled `testset/` and `examples/plot_pr_curves.py` for the TEN VAD–Silero comparison on Linux x64
- Measured footprint: 306 KB Linux TEN VAD library and RTF of 0.0086 versus Silero's 0.0127 on the same Xeon Gold 6348
- ARM64 packaging: the documented 1.0.6.10 manylinux wheel requires glibc 2.27 or newer and bundles the model and ONNX Runtime
```

## Quick Start / Clone
```bash
pip install -U --force-reinstall -v git+https://github.com/TEN-framework/ten-vad.git
```
