Registry / ai-ml / pymicro-vad

pymicro-vad

JSON →
library2.0.1pypypi✓ verified 82d ago

Self-contained voice activity detector (VAD) for Python. Lightweight, no external dependencies, uses WebRTC VAD engine. Current version: 2.0.1, release cadence: irregular.

pip install pymicro-vad
INSTALL
IMPORT
SIG · PYMICRO-VAD
P
pymicro-vad
ai-mlpythonv2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MicroVad
from pymicro_vad import MicroVad
from pymicro_vad import VAD
create_vad
from pymicro_vad import create_vad
process_10ms
from pymicro_vad import process_10ms

Creates a VAD instance and checks if a 10ms audio frame contains speech.

from pymicro_vad import VAD vad = VAD(sample_rate=16000) # Example: detect voice activity in a 16-bit PCM frame frame = b'\x00\x00' * 160 # 10ms at 16000 Hz is_voice = vad.is_speech(frame) print(is_voice)
Debug
Known issues
gotchaThe VAD expects raw PCM audio (16-bit little-endian) as bytes. Do not pass numpy arrays or floats without conversion.
fix
Convert audio to bytes using (array * 32767).astype('int16').tobytes() if using floats.
affects: all
gotchaFrame size must match the expected number of samples for the sample rate. For 16kHz, 10ms frames are 160 samples (320 bytes). Misaligned sizes cause silent false negatives.
fix
Ensure frame length in samples = sample_rate * 0.01 (e.g., 160 for 16kHz).
affects: all
Upgrade
Version history
2.0.1latest on PyPI · released Dec 16, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
pymicro-vad — pip install pymicro-vad · libregistry