[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73209":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":38,"readmeContent":39,"aiSummary":40,"trendingCount":15,"starSnapshotCount":15,"syncStatus":41,"lastSyncTime":42,"discoverSource":43},73209,"ten-vad","TEN-framework\u002Ften-vad","TEN-framework","Voice Activity Detector (VAD) : low-latency, high-performance and lightweight","https:\u002F\u002Fhuggingface.co\u002FTEN-framework\u002Ften-vad",null,"C",2148,169,23,0,4,15,40,12,28.69,"Other",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37],"audio","automatic-speech-recognition","conversational-ai","real-time","silero-vad","speech","speech-processing","vad","voice-activity-detection","voice-agent","voice-commands","voice-recognition","2026-06-12 02:03:10","\u003Cdiv align=\"center\">\n\n![Image](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fe504135e-67fd-4fa1-b0e4-d495358d8aa5)\n\n[![TEN Releases]( https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Ften-framework\u002Ften-vad?color=369eff&labelColor=gray&logo=github&style=flat-square )](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Freleases)\n[![Release Date](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease-date\u002Ften-framework\u002Ften-vad?labelColor=gray&style=flat-square)](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Freleases)\n[![Discussion posts](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdiscussions\u002FTEN-framework\u002Ften-vad?labelColor=gray&color=%20%23f79009)](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fdiscussions\u002F)\n[![Commits](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcommit-activity\u002Fm\u002FTEN-framework\u002Ften-vad?labelColor=gray&color=pink)](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fgraphs\u002Fcommit-activity)\n[![Issues closed](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-search?query=repo%3ATEN-framework%2Ften-vad%20is%3Aclosed&label=issues%20closed&labelColor=gray&color=green)](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fissues)\n![](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Ften-framework\u002Ften-vad?color=c4f042&labelColor=gray&style=flat-square)\n[![PRs Welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome!-brightgreen.svg?style=flat-square)](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fpulls)\n[![HuggingFace TEN VAD](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHugging%20Face-TEN%20VAD-yellow?style=flat&logo=huggingface)](https:\u002F\u002Fhuggingface.co\u002FTEN-framework\u002Ften-vad)\n[![Ask DeepWiki](https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg)](https:\u002F\u002Fdeepwiki.com\u002FTEN-framework\u002FTEN-vad)\n\u003C!-- [![ReadmeX](https:\u002F\u002Fraw.githubusercontent.com\u002FCodePhiliaX\u002Fresource-trusteeship\u002Fmain\u002Freadmex.svg)](https:\u002F\u002Freadmex.com\u002FTEN-framework\u002Ften-vad) -->\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F14548\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F14548\" alt=\"TEN-framework%2Ften-vad | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n\u003C\u002Fdiv>\n\n\u003Cbr>\n\n## Latest News 🔥\n- [2025\u002F11] **WASM** build guide and browser test demo are now available in `lib\u002FWeb` and `examples`.\n- [2025\u002F11] We supported **Python** inference with **ONNX model** on **Linux**, **macOS** thanks to [Guy Nicholson](https:\u002F\u002Fgithub.com\u002Fguynich)!\n- [2025\u002F11] We supported **Golang** on **Linux**, **macOS** and **Windows** with usage of the prebuilt-libs thanks to [hylarucoder](https:\u002F\u002Fgithub.com\u002Fhylarucoder)!\n- [2025\u002F11] We supported **Java** on **Linux**, **macOS**, **Windows**, **Android** with usage of the prebuilt-libs thanks to [ZhangYang(arthasking123)](https:\u002F\u002Fgithub.com\u002Farthasking123)!\n- [2025\u002F07] 🎉 Exciting news! **TEN VAD** is now **integrated** into [**k2-fsa\u002Fsherpa-onnx**](https:\u002F\u002Fgithub.com\u002Fk2-fsa\u002Fsherpa-onnx), thanks to the fantastic work by [Fangjun Kuang](https:\u002F\u002Fgithub.com\u002Fcsukuangfj)! You can now achieve more precise speech segment extraction and enjoy an enhanced ASR experience! Refer to the [documentation](https:\u002F\u002Fk2-fsa.github.io\u002Fsherpa\u002Fonnx\u002Fvad\u002Ften-vad.html#) and give it a try!\n- [2025\u002F07] We supported **Python inference** on **macOS** and **Windows** with usage of the prebuilt-libs!\n- [2025\u002F06] We **finally** released and **open-sourced** the **ONNX** model and the corresponding **preprocessing code**! Now you can deploy **TEN VAD** on **any platform** and **any hardware architecture**!\n- [2025\u002F06] We are excited to announce the release of **WASM+JS** for Web WASM Support.\n\n\u003Cbr>\n\n## Table of Contents\n- [Welcome to TEN](#welcome-to-ten)\n- [TEN Hugging Face Space](#ten-hugging-face-space)\n- [Introduction](#introduction)\n- [Key Features](#key-features)\n  - [High-Performance](#1-high-performance)\n    - [Performance Comparison](#11-performance-comparison)\n  - [Agent-Friendly](#2-agent-friendly)\n  - [Lightweight](#3-lightweight)\n  - [Multiple Programming Languages and Platforms](#4-multiple-programming-languages-and-platforms)\n  - [Supported Sampling Rate and Hop Size](#5-supported-sampling-rate-and-hop-size)\n- [Developers Testimonial](#developers-testimonial)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n  - [Python Usage](#python-usage)\n    - [Linux \u002F macOS \u002F Windows](#1-linux--macos--windows)\n  - [JS Usage](#js-usage)\n  - [Java Usage](#java-usage)\n  - [Go (Golang) Usage](#go-golang-usage)\n  - [C Usage](#c-usage)\n    - [Linux](#1-linux)\n    - [Windows](#2-windows)\n    - [macOS](#3-macos)\n    - [Android](#4-android)\n    - [iOS](#5-ios)\n- [TEN Ecosystem](#ten-ecosystem)\n- [Ask Questions](#ask-questions)\n- [Citations](#citations)\n- [License](#license)\n\n\u003Cbr>\n\n## Welcome to TEN\n\nTEN is an open-source framework for conversational voice AI agents.\n\n[TEN Ecosystem](#ten-ecosystem) includes [TEN Framework](https:\u002F\u002Fgithub.com\u002Ften-framework\u002Ften-framework), [Agent Examples](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-framework\u002Ftree\u002Fmain\u002Fai_agents\u002Fagents\u002Fexamples), [VAD](https:\u002F\u002Fgithub.com\u002Ften-framework\u002Ften-vad), [Turn Detection](https:\u002F\u002Fgithub.com\u002Ften-framework\u002Ften-turn-detection) and [Portal](https:\u002F\u002Fgithub.com\u002Ften-framework\u002Fportal).\n\n\u003Cbr>\n\n| Community Channel | Purpose |\n| ---------------- | ------- |\n| [![Follow on X](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002FTenFramework?logo=X&color=%20%23f5f5f5)](https:\u002F\u002Ftwitter.com\u002Fintent\u002Ffollow?screen_name=TenFramework) | Follow TEN Framework on X for updates and announcements |\n| [![Follow on LinkedIn](https:\u002F\u002Fcustom-icon-badges.demolab.com\u002Fbadge\u002FLinkedIn-TEN_Framework-0A66C2?logo=linkedin-white&logoColor=fff)](https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Ften-framework) | Follow TEN Framework on LinkedIn for updates and announcements |\n| [![Discord TEN Community](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join%20TEN%20Community-5865F2?style=flat&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002FVnPftUzAMJ) | Join our Discord community to connect with developers |\n| [![Hugging Face Space](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHugging%20Face-TEN%20Framework-yellow?style=flat&logo=huggingface)](https:\u002F\u002Fhuggingface.co\u002FTEN-framework) | Join our Hugging Face community to explore our spaces and models |\n| [![WeChat](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTEN_Framework-WeChat_Group-%2307C160?logo=wechat&labelColor=darkgreen&color=gray)](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-agent\u002Fdiscussions\u002F170) | Join our WeChat group for Chinese community discussions |\n\n\u003Cbr>\n\n> \\[!IMPORTANT]\n>\n> **Star TEN Repositories** ⭐️\n>\n> Get instant notifications for new releases and updates. Your support helps us grow and improve TEN!\n\n\u003Cbr>\n\n![TEN star us gif](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Feeebe996-8c14-4bf7-82ae-f1a1f7e30705)\n\n\u003Cbr>\n\n## TEN Hugging Face Space\n\n\u003Chttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F725a8318-d679-4b17-b9e4-e3dce999b298>\n\nYou are more than welcome to [Visit TEN Hugging Face Space](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FTEN-framework\u002Ften-agent-demo) to try VAD and Turn Detection together.\n\n\u003Cbr>\n\n## **Introduction**\n\n**TEN VAD** is a real-time voice activity detection system designed for enterprise use, providing accurate frame-level speech activity detection. It shows superior precision compared to both WebRTC VAD and Silero VAD, which are commonly used in the industry. Additionally, TEN VAD offers lower computational complexity and reduced memory usage compared to Silero VAD. Meanwhile, the architecture's temporal efficiency enables rapid voice activity detection, significantly reducing end-to-end response and turn detection latency in conversational AI systems.\n\n\u003Cbr>\n\n## **Key Features**\n\n### **1. High-Performance:**\n\nThe precision-recall curves comparing the performance of WebRTC VAD (pitch-based), Silero VAD, and TEN VAD are shown below. The evaluation is conducted on the precisely manually annotated testset. The audio files are from librispeech, gigaspeech, DNS Challenge etc. As demonstrated, TEN VAD achieves the best performance. Additionally, cross-validation experiments conducted on large internal real-world datasets demonstrate the reproducibility of these findings. The **testset with annotated labels** is released in directory \"testset\" of this repository.\n\n \u003Cbr>\n\n![PR Curves Performance Comparison](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fraw\u002Fmain\u002Fexamples\u002Fimages\u002FPR_Curves_testset.png)\n\nNote that the default threshold of 0.5 is used to generate binary speech indicators (0 for non-speech signal, 1 for speech signal). This threshold needs to be tuned according to your domain-specific task. \n\n\n### **1.1 Performance Comparison**\n\nDevelopers can reproduce the performance comparison PR curves for **TEN VAD** and **Silero VAD** on the open-source testset (as shown in the figure above) by executing the following script on Linux x64 with a simply one line of code. The output figure will be saved in the same directory as the script.\n\n```\ncd .\u002Fexamples\npython plot_pr_curves.py\n```\n\n\u003Cbr>\n\n### **2. Agent-Friendly:**\n\nAs illustrated in the figure below, TEN VAD rapidly detects speech-to-non-speech transitions, whereas Silero VAD suffers from a delay of several hundred milliseconds, resulting in increased end-to-end latency in human-agent interaction systems. In addition, as demonstrated in the 6.5s-7.0s audio segment, Silero VAD fails to identify short silent durations between adjacent speech segments.\n\n![Agent-Friendly Response](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fraw\u002Fmain\u002Fexamples\u002Fimages\u002FAgent-Friendly-image.png)\n\u003Cbr>\n\n### **3. Lightweight:**\n\nWe evaluated the RTF (Real-Time Factor) across five distinct platforms, each equipped with varying CPUs. TEN VAD demonstrates much lower computational complexity and smaller library size than Silero VAD.\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Cth align=\"center\" rowspan=\"2\" valign=\"middle\"> Platform \u003C\u002Fth>\n    \u003Cth align=\"center\" rowspan=\"2\" valign=\"middle\"> CPU \u003C\u002Fth>\n    \u003Cth align=\"center\" colspan=\"2\"> RTF \u003C\u002Fth>\n    \u003Cth align=\"center\" colspan=\"2\"> Lib Size \u003C\u002Fth>\n\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\" style=\"white-space: nowrap;\"> TEN VAD \u003C\u002Fth>\n    \u003Cth align=\"center\" style=\"white-space: nowrap;\"> Silero VAD \u003C\u002Fth>\n    \u003Cth align=\"center\"> TEN VAD \u003C\u002Fth>\n    \u003Cth align=\"center\"> Silero VAD \u003C\u002Fth>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\" rowspan=\"3\"> Linux \u003C\u002Fth>\n    \u003Ctd style=\"white-space: nowrap;\"> AMD Ryzen 9 5900X 12-Core \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0150 \u003C\u002Ftd>\n    \u003Ctd align=\"center\" rowspan=\"2\" valign=\"middle\"> \u002F \u003C\u002Ftd>\n    \u003Ctd align=\"center\" rowspan=\"3\" valign=\"middle\"> 306KB \u003C\u002Ftd>\n    \u003Ctd align=\"center\" rowspan=\"10\" style=\"white-space: nowrap;\" valign=\"middle\"> 2.16MB(JIT) \u002F 2.22MB(ONNX) \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd style=\"white-space: nowrap;\"> Intel(R) Xeon(R) Platinum 8253 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0136 \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd style=\"white-space: nowrap;\"> Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0086 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0127 \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> Windows \u003C\u002Fth>\n    \u003Ctd> Intel i7-10710U \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0150 \u003C\u002Ftd>\n    \u003Ctd align=\"center\" rowspan=\"7\" valign=\"middle\"> \u002F \u003C\u002Ftd>\n    \u003Ctd align=\"center\" style=\"white-space: nowrap;\"> 464KB(x86) \u002F 508KB(x64) \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> macOS \u003C\u002Fth>\n    \u003Ctd> M1 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0160 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 731KB \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> Web \u003C\u002Fth>\n    \u003Ctd> macOS(M1) \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.010 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 277KB \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\" rowspan=\"2\"> Android \u003C\u002Fth>\n    \u003Ctd> Galaxy J6+ (32bit, 425) \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0570 \u003C\u002Ftd>\n    \u003Ctd align=\"center\" rowspan=\"2\" style=\"white-space: nowrap;\"> 373KB(v7a) \u002F 532KB(v8a)\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd> Oppo A3s (450) \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0490 \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\" rowspan=\"2\"> iOS \u003C\u002Fth>\n    \u003Ctd> iPhone6 (A8) \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0210 \u003C\u002Ftd>\n    \u003Ctd align=\"center\" rowspan=\"2\"> 320KB\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd> iPhone8 (A11) \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> 0.0050 \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\u003Cbr>\n\n### **4. Multiple Programming Languages and Platforms:**\n\nTEN VAD provides cross-platform C compatibility across five operating systems (Linux x64, Windows, macOS, Android, iOS), with Python bindings optimized for Linux x64, with wasm for Web.\n\u003Cbr>\n\u003Cbr>\n\n### **5. Supported Sampling Rate and Hop Size:**\n\nTEN VAD operates on 16kHz audio input with configurable hop sizes (optimized frame configurations: 160\u002F256 samples=10\u002F16ms). Other sampling rates must be resampled to 16kHz.\n\u003Cbr>\n\u003Cbr>\n\n## **Developers Testimonial**\n> *\"We selected TEN VAD because it provides faster and more accurate sentence-end detection in Japanese compared to other VADs, while still being lightweight and fast enough for live use.\"* - LiveCap,Hakase shojo.\n\n> *\"TEN VAD's overall performance is better than Silero VAD. Its high accuracy and low resource consumption helped us improve efficiency and significantly reduce costs.\"* - Rustpbx.\n\u003Cbr>\n\n## **Installation**\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad.git\n```\n\n\u003Cbr>\n\n## **Quick Start**\n\nThe project supports five major platforms with dynamic library linking.\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Cth align=\"center\"> Platform \u003C\u002Fth>\n    \u003Cth align=\"center\"> Dynamic Lib \u003C\u002Fth>\n    \u003Cth align=\"center\"> Supported Arch \u003C\u002Fth>\n    \u003Cth align=\"center\"> Interface Language \u003C\u002Fth>\n    \u003Cth align=\"center\"> Header \u003C\u002Fth>\n    \u003Cth align=\"center\"> Comment \u003C\u002Fv>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> Linux \u003C\u002Fth>\n    \u003Ctd align=\"center\"> libten_vad.so \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> x64 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> Python, C, Java, Go \u003C\u002Ftd>\n    \u003Ctd rowspan=\"6\">ten_vad.h \u003Cbr> ten_vad.py \u003Cbr> ten_vad.js \u003Cbr> TenVad.java\u003C\u002Ftd>\n    \u003Ctd>  \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> Windows \u003C\u002Fth>\n    \u003Ctd align=\"center\"> ten_vad.dll \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> x64, x86 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> C, Java, Go \u003C\u002Ftd>\n    \u003Ctd>  \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> macOS \u003C\u002Fth>\n    \u003Ctd align=\"center\"> ten_vad.framework \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> arm64, x86_64 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> C, Java, Go \u003C\u002Ftd>\n    \u003Ctd>  \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> Web \u003C\u002Fth>\n    \u003Ctd align=\"center\"> ten_vad.wasm \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> \u002F \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> JS \u003C\u002Ftd>\n    \u003Ctd>  \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> Android \u003C\u002Fth>\n    \u003Ctd align=\"center\"> libten_vad.so \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> arm64-v8a, armeabi-v7a \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> C, Java \u003C\u002Ftd>\n    \u003Ctd>  \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Cth align=\"center\"> iOS \u003C\u002Fth>\n    \u003Ctd align=\"center\"> ten_vad.framework \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> arm64 \u003C\u002Ftd>\n    \u003Ctd align=\"center\"> C \u003C\u002Ftd>\n    \u003Ctd> 1. not simulator \u003Cbr> 2. not iPad \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\n\u003C\u002Ftable>\n\u003Cbr>\n\n### **Python Usage**\n\n#### **1. Linux \u002F macOS \u002F Windows**\n\n#### **Requirements**\n\n- numpy (Version 1.17.4\u002F1.26.4 verified)\n- scipy (Version >= 1.5.0)\n- scikit-learn (Version 1.2.2\u002F1.5.0 verified, for plotting PR curves)\n- matplotlib (Version 3.1.3\u002F3.10.0 verified, for plotting PR curves)\n- torchaudio (Version 2.2.2 verified, for plotting PR curves)\n\n- Python version 3.8.19\u002F3.10.14 verified\n\nNote: You could use other versions of above packages, but we didn't test other versions.\n\n\u003Cbr>\n\nThe **lib** only depend on numpy, you have to install the dependency via requirements.txt:\n\n`pip install -r requirements.txt`\n\nFor **running demo or plotting PR curves**, you have to install the dependencies:\n\n`pip install -r .\u002Fexamples\u002Frequirements.txt`\n\nNote that if you did not install **libc++1** (Linux), you have to run the code below to install it:\n\n```\nsudo apt update\nsudo apt install libc++1\n```\n\n\u003Cbr>\n\n#### **Usage (Prebuilt-libs)**\n\nNote: For usage in python, you can either use it by **git clone** or **pip**.\n\n##### **By using git clone:**\n\n1. Clone the repository\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad.git\n```\n\n2. Enter examples directory\n\n```\ncd .\u002Fexamples\n```\n\n3. Test\n\n```\npython test.py s0724-s0730.wav out.txt\n```\n\n\u003Cbr>\n\n##### **By using pip:**\n\n1. Install via pip\n\n```\npip install -U --force-reinstall -v git+https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad.git\n```\n\n2. Write your own use cases and import the class, the attributes of class TenVAD you can refer to ten_vad.py\n\n```\nfrom ten_vad import TenVad\n```\n\n\u003Cbr>\n\n#### **Usage (ONNX model)**\nYou have to download the **onnxruntime** packages from the [microsoft official onnxruntime github website](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fonnxruntime). Note that the version of onnxruntime must be higher than or equal to 1.17.1 (e.g. onnxruntime-linux-x64-1.17.1.tgz).\n\u003Cbr>\n\u003Cbr>\nYou can check the official **ONNX Runtime releases** from [this website](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fonnxruntime\u002Ftags). And for example, to download version 1.17.1 (Linux x64), use [this link](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fonnxruntime\u002Freleases\u002Fdownload\u002Fv1.17.1\u002Fonnxruntime-linux-x64-1.17.1.tgz). After extracting the compressed file, you'll find two important directories:`include\u002F` - header files, `lib\u002F` - library files\n\n```\n1) cd examples_onnx\u002Fpython\n2) .\u002Fbuild-and-deploy-linux.sh --ort-path \u002Fabsolute\u002Fpath\u002Fto\u002Fyour\u002Fonnxruntime\u002Froot\u002Fdir # For Linux. If macOS, run build-and-deploy-macos.sh instead.\n```\n\n**Note 1**: If executing the onnx demo from a different directory than the one used when running build-and-deploy-linux.sh, ensure to create a symbolic link to src\u002Fonnx_model\u002F to prevent ONNX model file loading failures.\n\u003Cbr>\n**Note 2**: The **ONNX model** locates in `src\u002Fonnx_model` directory.\n\u003Cbr>\n**Note 3**: For **macOS**, run **build-and-deploy-macos.sh** instead.\n\n\u003Cbr>\n\n### **JS Usage**\n\n##### **Requirements**\n\n- Node.js (macOS v14.18.2, Linux v16.20.2 verified)\n- Terminal\n- Browser\n\n##### **Usage**\n\n```\nTerminal\n1) cd .\u002Fexamples\n2) node test_node.js s0724-s0730.wav out.txt\n\nBrowser\n1) python3 -m http.server 8000\n2) Open browser and navigate to http:\u002F\u002Flocalhost:8000\u002Fexamples\u002Ftest_browser.html\n```\n\n\u003Cbr>\n\n### **Java Usage**\n\nTEN VAD provides comprehensive Java support with JNI (Java Native Interface) bindings for all major platforms.\n\n#### **Requirements**\n\n- Java 8 or higher\n- Native libraries in `lib\u002F` directory\n- JNI headers\n\n#### **Compilation**\n\n```bash\n# Compile Java source, note if JNA library is not installed, you should download it first. For example, you can download JNA library and include it here. You can also export it to the CLASSPATH environment variables\nwget https:\u002F\u002Frepo1.maven.org\u002Fmaven2\u002Fnet\u002Fjava\u002Fdev\u002Fjna\u002Fjna\u002F5.13.0\u002Fjna-5.13.0.jar # I just picked a random version\njavac -encoding UTF-8 -cp jna-5.13.0.jar -d . include\u002FTenVad.java examples\u002FTestTenVad.java\n\n# Run example in the project root directory\njava -cp .:jna-5.13.0.jar TestTenVad examples\u002Fs0724-s0730.wav examples\u002Fout.txt\n\n# Run example in the examples directory\njava -cp ..:..\u002Fjna-5.13.0.jar TestTenVad s0724-s0730.wav out.txt\n```\n\n#### **Example Code**\n\n```java\nimport com.ten.vad.TenVad;\n\npublic class VADExample {\n    public static void main(String[] args) {\n        \u002F\u002F Create VAD instance\n        TenVad vad = new TenVad(256, 0.5f);\n        \n        \u002F\u002F Process audio frame\n        short[] audioFrame = new short[256]; \u002F\u002F 16ms at 16kHz\n        \u002F\u002F ... fill audioFrame with audio data ...\n        \n        TenVad.VadResult result = vad.process(audioFrame);\n        System.out.println(\"Probability: \" + result.getProbability());\n        System.out.println(\"Voice detected: \" + result.isVoiceDetected());\n        \n        \u002F\u002F Clean up\n        vad.destroy();\n    }\n}\n```\n\n#### **Platform-Specific Notes**\n\n- **Linux**: Requires `libc++1` package\n- **Windows**: Ensure Visual C++ Redistributable is installed\n- **macOS**: No additional requirements\n- **Android**: Use Android NDK for native library integration\n\n#### **API Reference**\n\n```java\npublic class TenVad {\n    \u002F\u002F Constructor\n    public TenVad(int hopSize, float threshold)\n    \n    \u002F\u002F Process audio frame\n    public VadResult process(short[] audioData)\n    \n    \u002F\u002F Get library version\n    public static String getVersion()\n    \n    \u002F\u002F Cleanup\n    public void destroy()\n}\n\npublic static class VadResult {\n    public float getProbability()    \u002F\u002F [0.0, 1.0]\n    public int getFlag()            \u002F\u002F 0 or 1\n    public boolean isVoiceDetected() \u002F\u002F true if voice detected\n}\n```\n\n\u003Cbr>\n\n\n### **Go (Golang) Usage**\n\nTEN VAD provides Golang support for Linux, macOS and Windows.\n\n#### **Usage with compilation**\n```\ncd examples\u002Fgo-tenvad\ngo build -o tenvad .\n.\u002Ftenvad\n```\n#### **Usage without compilation**\n```\ncd examples\u002Fgo-tenvad\nexport LD_LIBRARY_PATH=..\u002F..\u002Flib\u002FLinux\u002Fx64:$LD_LIBRARY_PATH # For Windows and macOS, export the corresponding lib path instead\ngo run .\n```\n\n\u003Cbr>\n\n### **C Usage**\n\n#### **Build Scripts**\n\nLocated in examples\u002F directory or examples_onnx\u002F (for **ONNX** usage on Linux):\n\n- Linux: build-and-deploy-linux.sh\n- Windows: build-and-deploy-windows.bat\n- macOS: build-and-deploy-mac.sh\n- Android: build-and-deploy-android.sh\n- iOS: build-and-deploy-ios.sh\n\n#### **Dynamic Library Configuration**\n\nRuntime library path configuration:\n\n- Linux\u002FAndroid: LD_LIBRARY_PATH\n- macOS: DYLD_FRAMEWORK_PATH\n- Windows: DLL in executable directory or system PATH\n\n#### **Customization**\n\n- Modify platform-specific build scripts\n- Adjust CMakeLists.txt\n- Configure toolchain and architecture settings\n\n#### **Overview of Usage**\n\n- Navigate to examples\u002F or examples_onnx\u002F (for **ONNX** usage on Linux)\n- Execute platform-specific build script\n- Configure dynamic library path\n- Run demo with sample audio s0724-s0730.wav\n- Processed results saved to out.txt\n\n\u003Cbr>\n\nThe detailed usage methods of each platform are as follows \u003Cbr>\n\n#### **1. Linux**\n\n##### **Requirements**\n\n- Clang (e.g. 6.0.0-1ubuntu2 verified)\n- CMake\n- Terminal\n\nNote that if you did not install **libc++1**, you have to run the code below to install it:\n\n```\nsudo apt update\nsudo apt install libc++1\n```\n\n##### **Usage (prebuilt-lib)**\n\n```\n1) cd .\u002Fexamples\n2) .\u002Fbuild-and-deploy-linux.sh\n```\n\n##### **Usage (ONNX)**\n\nYou have to download the **onnxruntime** packages from the [microsoft official onnxruntime github website](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fonnxruntime). Note that the version of onnxruntime must be higher than or equal to 1.17.1 (e.g. onnxruntime-linux-x64-1.17.1.tgz).\n\u003Cbr>\n\u003Cbr>\nYou can check the official **ONNX Runtime releases** from [this website](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fonnxruntime\u002Ftags). And for example, to download version 1.17.1 (Linux x64), use [this link](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fonnxruntime\u002Freleases\u002Fdownload\u002Fv1.17.1\u002Fonnxruntime-linux-x64-1.17.1.tgz). After extracting the compressed file, you'll find two important directories:`include\u002F` - header files, `lib\u002F` - library files\n\n```\n1) cd examples_onnx\n2) .\u002Fbuild-and-deploy-linux.sh --ort-path \u002Fabsolute\u002Fpath\u002Fto\u002Fyour\u002Fonnxruntime\u002Froot\u002Fdir\n```\n\n**Note 1**: If executing the onnx demo from a different directory than the one used when running build-and-deploy-linux.sh, ensure to create a symbolic link to src\u002Fonnx_model\u002F to prevent ONNX model file loading failures.\n\u003Cbr>\n**Note 2**: The **ONNX model** locates in `src\u002Fonnx_model` directory.\n\u003Cbr>\n**Note 3**: For ONNX example builds see [examples_onnx\u002FREADME.md](\u002Fexamples_onnx\u002FREADME.md).\n\n\u003Cbr>\n\n#### **2. Windows**\n\n##### **Requirements**\n\n- Visual Studio (2017, 2019, 2022 verified)\n- CMake (3.26.0-rc6 verified)\n- Terminal (MINGW64 or powershell)\n\n##### **Usage**\n\n```\n1) cd .\u002Fexamples\n2) Configure \"build-and-deploy-windows.bat\" with your preferred:\n    - Architecture (default: x64)\n    - Visual Studio version (default: 2019)\n3) .\u002Fbuild-and-deploy-windows.bat\n```\n\n\u003Cbr>\n\n#### **3. macOS**\n\n##### **Requirements**\n\n- Xcode (15.2 verified)\n- CMake (3.19.2 verified)\n\n##### **Usage**\n\n```\n1) cd .\u002Fexamples\n2) Configure \"build-and-deploy-mac.sh\" with your target architecture:\n  - Default: arm64 (Apple Silicon)\n  - Alternative: x86_64 (Intel)\n3) .\u002Fbuild-and-deploy-mac.sh\n```\n\n\u003Cbr>\n\n#### **4. Android**\n\n##### **Requirements**\n\n- NDK (r25b, macOS verified)\n- CMake (3.19.2, macOS verified)\n- adb (1.0.41, macOS verified)\n\n##### **Usage**\n\n```\n1) cd .\u002Fexamples\n2) export ANDROID_NDK=\u002Fpath\u002Fto\u002Fandroid-ndk  # Replace it with your NDK installation path\n3) Configure \"build-and-deploy-android.sh\" with your build settings:\n  - Architecture: arm64-v8a (default) or armeabi-v7a\n  - Toolchain: aarch64-linux-android-clang (default) or custom NDK toolchain\n4) .\u002Fbuild-and-deploy-android.sh\n```\n\n\u003Cbr>\n\n#### **5. iOS**\n\n##### **Requirements**\n\nXcode (15.2, macOS verified)\nCMake (3.19.2, macOS verified)\n\n##### **Usage**\n\n1. Enter examples directory\n\n```\ncd .\u002Fexamples\n```\n\n2. Creates Xcode project files for iOS build\n\n```\n.\u002Fbuild-and-deploy-ios.sh\n```\n\n3.  Follow the steps below to build and test on iOS device:\n\n    3.1. Use Xcode to open .xcodeproj files: a) cd .\u002Fbuild-ios, b) open .\u002Ften_vad_demo.xcodeproj\n\n    3.2. In Xcode IDE, select ten_vad_demo target (should check: Edit Scheme → Run → Release), then select your iOS Device (not simulator).\n\n    ![iOS Setup Image 1](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fraw\u002Fmain\u002Fexamples\u002Fimages\u002Fios_image_1.jpg)\n\n    3.3. Drag ten_vad\u002Flib\u002FiOS\u002Ften_vad.framework to \"Frameworks, Libraries, and Embedded Content\"\n\n    - (in TARGETS → ten_vad_demo → ten_vad_demo → General, should set Embed to \"Embed & Sign\").\n\n    - or add it directly in this way: \"Frameworks, Libraries, and Embedded Content\" → \"+\" → Add Other... → Add Files →...\n\n    - Note: If this step is not completed, you may encounter the following runtime error: \"dyld: Library not loaded: @rpath\u002Ften_vad.framework\u002Ften_vad\".\n\n    ![iOS Setup Image 2](https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad\u002Fraw\u002Fmain\u002Fexamples\u002Fimages\u002Fios_image_2.png)\n\n      3.4. Configure iOS device Signature\n\n    - in TARGETS → ten_vad_demo → Signing & Capabilities → Signing\n\n      - Modify Bundle Identifier: modify \"com.yourcompany\" to yours;\n\n      - Specify Provisioning Profile\n\n    - In TARGETS → ten_vad_demo → Build Settings → Signing → Code Signing Identity:\n\n      - Specify your Certification\n\n        3.5. Build in Xcode and run demo on your device.\n\n\u003Cbr>\n\n## TEN Ecosystem\n\n| Project | Preview |\n| ------- | ------- |\n| [**️TEN Framework**][ten-framework-link]\u003Cbr>Open-source framework for conversational AI Agents.\u003Cbr>\u003Cbr>![][ten-framework-shield] | ![][ten-framework-banner] |\n| [**TEN VAD**][ten-vad-link]\u003Cbr>Low-latency, lightweight and high-performance streaming voice activity detector (VAD).\u003Cbr>\u003Cbr>![][ten-vad-shield] | ![][ten-vad-banner] |\n| [**️ TEN Turn Detection**][ten-turn-detection-link]\u003Cbr>TEN Turn Detection enables full-duplex dialogue communication.\u003Cbr>\u003Cbr>![][ten-turn-detection-shield] | ![][ten-turn-detection-banner] |\n| [**TEN Agent Examples**][ten-agent-example-link]\u003Cbr>Usecases powered by TEN.\u003Cbr>\u003Cbr> | ![][ten-agent-example-banner] |\n| [**TEN Portal**][ten-portal-link]\u003Cbr>The official site of the TEN Framework with documentation and a blog.\u003Cbr>\u003Cbr>![][ten-portal-shield] | ![][ten-portal-banner] |\n\n\n\u003Cbr>\n\n## Ask Questions\n\nTEN VAD is available on these AI-powered Q&A platforms. They can help you find answers quickly and accurately in multiple languages, covering everything from basic setup to advanced implementation details.\n\n| Service | Link |\n| ------- | ---- |\n| DeepWiki | [![Ask DeepWiki](https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg)](https:\u002F\u002Fdeepwiki.com\u002FTEN-framework\u002FTEN-vad) |\n| ReadmeX | [![ReadmeX](https:\u002F\u002Fraw.githubusercontent.com\u002FCodePhiliaX\u002Fresource-trusteeship\u002Fmain\u002Freadmex.svg)](https:\u002F\u002Freadmex.com\u002FTEN-framework\u002Ften-vad) |\n\n\u003Cbr>\n\n## **Citations**\n\n```\n@misc{TEN VAD,\n  author = {TEN Team},\n  title = {TEN VAD: A Low-Latency, Lightweight and High-Performance Streaming Voice Activity Detector (VAD)},\n  year = {2025},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-vad.git},\n  email = {developer@ten.ai}\n}\n```\n\n\u003Cbr>\n\n## License\n\nThis project is licensed pursuant to the Apache 2.0 with additional conditions. Refer to the \"LICENSE\" file in the root directory for detailed information. Note that `pitch_est.cc` contains modified code derived from [LPCNet](https:\u002F\u002Fgithub.com\u002Fxiph\u002FLPCNet), which is [BSD-2-Clause](https:\u002F\u002Fspdx.org\u002Flicenses\u002FBSD-2-Clause.html) and [BSD-3-Clause](https:\u002F\u002Fspdx.org\u002Flicenses\u002FBSD-3-Clause.html) licensed, refer to the NOTICES file in the root directory for detailed information.\n\n\u003Cbr>\n\n[back-to-top]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F-Back_to_top-gray?style=flat-square\n[ten-framework-shield]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ften-framework\u002Ften_framework?color=ffcb47&labelColor=gray&style=flat-square&logo=github\n[ten-framework-banner]: https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F2a560a74-68f3-4f4a-9ec8-89464c42a9c7\n[ten-framework-link]: https:\u002F\u002Fgithub.com\u002Ften-framework\u002Ften_framework\n\n[ten-vad-link]: https:\u002F\u002Fgithub.com\u002Ften-framework\u002Ften-vad\n[ten-vad-shield]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ften-framework\u002Ften-vad?color=ffcb47&labelColor=gray&style=flat-square&logo=github\n[ten-vad-banner]: https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fe504135e-67fd-4fa1-b0e4-d495358d8aa5\n\n[ten-turn-detection-link]: https:\u002F\u002Fgithub.com\u002Ften-framework\u002Ften-turn-detection\n[ten-turn-detection-shield]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ften-framework\u002Ften-turn-detection?color=ffcb47&labelColor=gray&style=flat-square&logo=github\n[ten-turn-detection-banner]: https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fc72d82cc-3667-496c-8bd6-3d194a91c452\n\n[ten-agent-example-link]: https:\u002F\u002Fgithub.com\u002FTEN-framework\u002Ften-framework\u002Ftree\u002Fmain\u002Fai_agents\u002Fagents\u002Fexamples\n[ten-agent-example-banner]:https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F7f735633-c7f6-4432-b6b4-d2a2977ca588\n\n[ten-portal-link]: https:\u002F\u002Fgithub.com\u002Ften-framework\u002Fportal\n[ten-portal-shield]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ften-framework\u002Fportal?color=ffcb47&labelColor=gray&style=flat-square&logo=github\n[ten-portal-banner]: https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff56c75b9-722c-4156-902d-ae98ce2b3b5e\n","TEN VAD 是一个低延迟、高性能且轻量级的语音活动检测器。该项目使用 C 语言开发，具备实时处理音频流的能力，能够准确地识别出语音片段并区分静音部分。其核心优势在于极低的计算资源消耗和快速响应时间，非常适合需要即时反馈的应用场景，如实时语音通信、语音助手及命令识别等。此外，TEN VAD 还提供了跨平台支持，包括 Python、Golang 和 Java 等多种编程语言接口，进一步增强了其在不同环境下的适用性。",2,"2026-06-11 03:44:30","high_star"]