Skip to main content

Load arbitrary Voice Activity Detection (VAD) models behind a unified ONNX API

Project description

cascadevad

Load arbitrary Voice Activity Detection models behind a single, unified API — every model runs through ONNX Runtime. One streaming/​batch interface, one audio-format story, pluggable models.

from cascadevad import load_vad

vad = load_vad("silero")                              # bundled, works fully offline
prob = vad.process_chunk(pcm_bytes)                   # streaming → float in [0, 1]
segments = vad.get_speech_segments(audio, sample_rate=16000)
# -> [SpeechSegment(start=0.32, end=2.27), SpeechSegment(start=3.27, end=4.45), ...]

Why

Every VAD ships its own loader, audio format, feature pipeline and state handling. cascadevad hides that behind one VADModel interface: feed it audio (raw int16 bytes, numpy arrays, any sample rate) and get back per-frame speech probabilities or ready-made speech segments. Models are described declaratively by an IOSignature, so a single generic engine drives most of them and you can point the same API at any custom .onnx file.

  • Lightweight runtime — only numpy, onnxruntime, huggingface_hub.
  • Offline by default — a small Silero model is bundled in the wheel.
  • Streaming and batchprocess_chunk() for live audio, get_speech_segments() / probabilities() for whole buffers.
  • Bring your own model — load any ONNX VAD by path/URL with a signature.
  • Extensible — third parties register backends/models via entry points.

Install

uv pip install cascadevad-onnx          # runtime (numpy + onnxruntime + huggingface_hub)
uv pip install "cascadevad-onnx[mic]"   # + microphone examples

Models

name rate parity vs upstream notes
silero / silero-8k / silero-op15 16k / 8k / 16k MAE 0 bundled default, raw PCM
marblenet / marblenet-int8 16k MAE 4e-4 NVIDIA NeMo Frame-VAD, multilingual (license)
pyannote / pyannote-int8 16k MAE 0 pyannote segmentation-3.0, windowed
fsmn / fsmn-quant 16k tracks upstream FunASR FSMN-VAD; needs cascadevad-onnx[fsmn]
speechbrain 16k MAE 0 SpeechBrain CRDNN, LibriParty-trained
ten 16k feature extractor provided by TEN's native library

See docs/backends.md for per-model detail and the benchmark for measured comparisons across datasets, including WebRTC and energy baselines.

Models other than the bundled Silero are downloaded on first use from the aryashah00/cascadevad-models HuggingFace repo and cached under $XDG_DATA_HOME/cascadevad. See docs/backends.md for per-model detail and parity notes.

CLI

cascadevad list                       # list available models
cascadevad probe silero               # print a model's ONNX input/output signature
cascadevad segment speech.wav         # print detected speech segments of a WAV

Documentation

License

Apache-2.0. Bundled/downloaded model weights retain their upstream licenses — see docs/licensing.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cascadevad_onnx-0.1.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cascadevad_onnx-0.1.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file cascadevad_onnx-0.1.0.tar.gz.

File metadata

  • Download URL: cascadevad_onnx-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cascadevad_onnx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b43c0207cb2b8d0c84a0e9991b155b6941a6988b20039b0c925581fd794a0aef
MD5 768bca612a7e1acd07c9982aec7c2020
BLAKE2b-256 b26232db5e31bd8a37f46cc4aedd9e676f4a87a1758022c6eb9cba49c39d2784

See more details on using hashes here.

Provenance

The following attestation bundles were made for cascadevad_onnx-0.1.0.tar.gz:

Publisher: publish.yml on arya-aistra/cascadevad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cascadevad_onnx-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cascadevad_onnx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 709f85afe59bd86145a2aa5cbb57c693f9957ce44af4f8e3b493585841293678
MD5 9cbbf270123922849ba551d4baf251f7
BLAKE2b-256 fc1c6fbb010ef7ea5f8ec43ca45070d1e4102d9ede169055e1a3d262de7da653

See more details on using hashes here.

Provenance

The following attestation bundles were made for cascadevad_onnx-0.1.0-py3-none-any.whl:

Publisher: publish.yml on arya-aistra/cascadevad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page