TEN-framework/ten-vad
C and ONNX inference for low-latency, frame-level voice activity detection
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & 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.
src/onnx_model/; manual examples require ONNX Runtime 1.17.1 or newertestset/ and examples/plot_pr_curves.py for the TEN VAD–Silero comparison on Linux x64Voice agents, streaming ASR, and on-device audio pipelines that need a local speech/non-speech signal and already control resampling and endpointing.
You need transcription, speaker labels, or turn completion out of the box, or cannot accommodate 16 kHz input and platform-specific native packaging.
Quick Start & Installation
pip install -U --force-reinstall -v git+https://github.com/TEN-framework/ten-vad.git
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| ten-vad ★ | 2.3k | +6 | C | — | C and ONNX inference for low-latency, frame-level voice activity detection |
| whisper.cpp | 55.8k | +292 | C++ | MIT | Native C/C++ Whisper inference for offline speech-to-text on CPUs and accelerato |
| faster-whisper | 27.2k | +147 | Python | MIT | Local Whisper transcription with CTranslate2 for CPU and GPU |
| fish-speech | 34k | +84 | Python | — | Self-hosted PyTorch speech inference for directed, multi-speaker audio |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/TEN-framework/ten-vad.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about ten-vad
How do I connect TEN VAD to a streaming voice agent?
Do I need a GPU, and how should I size CPU and memory?
Can I self-host TEN VAD and redistribute it in a commercial product?
How should I compare TEN VAD with Silero VAD and WebRTC VAD?
examples/plot_pr_curves.py on Linux x64 to reproduce the TEN VAD–Silero comparison on the labeled testset/. The published comparison also includes WebRTC VAD. Then test all candidates on the same target hardware and production-like audio. In a voice agent, false triggers and clipped speech endings at a given pause-detection latency are more useful selection criteria than a single PR curve.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy