vad-service

Detect and segment speech in real-time PCM streams via a FastAPI WebRTC VAD service.

Updated May 20, 2025
One-click install
npx skills add https://github.com/papdawin/customer-service-assistant --skill vad-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vad-service
Source: https://github.com/papdawin/customer-service-assistant/tree/main/vad
Command: npx skills add https://github.com/papdawin/customer-service-assistant --skill vad-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The VAD Service provides shared, real-time speech activity detection for a multi-tenant voice assistant platform, enabling efficient streaming and offline analysis across tenants.

Core Features & Use Cases

  • High-precision WebRTC VAD with energy gating for detecting speech segments in 16-bit PCM streams.
  • Supports both offline analysis and streaming frame-based processing with per-session state management.
  • Use cases include multi-tenant voice chat, call centers, and real-time transcription pipelines where consistent voice activity detection is required.

Quick Start

Install dependencies and run the service with:

  • Install: pip install -r requirements.txt
  • Run: uvicorn app:app --host 0.0.0.0 --port 8000
  • Endpoints: GET /health, POST /analyze, POST /frame

Frequently Asked Questions about vad-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect voice activity in real-time for a multi-tenant FastAPI application?

Real-time voice activity detection for multi-tenant FastAPI applications is handled by a shared WebRTC VAD service. It processes 16-bit PCM streams using energy gating and per-session state managed by an async lock.

Can I use WebRTC VAD for both offline audio analysis and streaming frame processing?

WebRTC VAD supports both offline analysis and streaming frame-based processing. The service detects speech segments, provides timestamps, and outputs trimmed audio for workflows requiring consistent voice activity detection.

How does this speech detection service manage state for concurrent voice sessions?

Speech detection manages concurrent voice sessions using per-session state controlled by an async lock. This approach ensures isolated and accurate voice activity detection across multiple tenants in streaming interfaces.

Does the multi-tenant VAD service work with 16-bit PCM audio streams?

The multi-tenant VAD service works directly with 16-bit PCM audio streams. It applies high-precision WebRTC VAD alongside energy gating to accurately detect and segment speech for real-time voice chat platforms.