Skip to main content

Dguard VAD

Based on Silero VAD and RnNoise.

Installation

pip install dguard_vad

or

git clone http://ai.lyxxkj.com.cn:3001/zhaosheng/dguard_vad.git
cd dguard_vad
pip install -e .

The model files will not be downloaded automatically. You need to download them manually and put them in the right place.(Default: $$DGUARD_MODEL_PATH/dguard_vad.onnx)

$DGUARD_MODEL_PATH is an environment variable that used in all dgurad* projects.

Usage

  1. VAD class
from dguard_vad import VAD
SR = 16000
WAV_PATH = "../data/test_16k.wav"
vad = VAD(SR)
# Use get_speech_timestamps to get 
# start and end timestamps of speech segments
timestamps = vad.get_speech_timestamps(WAV_PATH)
for _ in timestamps:
    print(_)

# You shuold get the following output:
# {'segment': 0, 'start': 26560, 'end': 48704}
# {'segment': 1, 'start': 71616, 'end': 106048}
# {'segment': 2, 'start': 149952, 'end': 185920}

# Use get_speech_probs to get probabilities for each chunk
probs = vad.get_speech_probs(WAV_PATH)
for _ in probs:
    print(_)
# You shuold get the following output:
# 0.02
# 0.01
# 0.01
# 0.01
# 0.0
  1. VAD class with noise suppression You just need to set denoise=True when initializing VAD class.
vad = VAD(SR, denoise=True)

Please note that: func:get_speech_probs may not work well with noise suppression.

  1. VADIterator class Please refer to ws_app/ws_server.py for more details.

Metadata

Release files for dguad-vad 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dguad-vad 0.1.0
File Size Uploaded Provenance Actions
dguad_vad-0.1.0.tar.gz 10.1 kB Without provenance Details for dguad_vad-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dguad-vad 0.1.0
File Interpreter ABI Platform Actions
dguad_vad-0.1.0-py3-none-any.whl Python 3 none any Details for dguad_vad-0.1.0-py3-none-any.whl

Total release size: 21.1 kB

Release files / dguad_vad-0.1.0.tar.gz

Download URL dguad_vad-0.1.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
90ef6f6aad1d33da145bd586784aa67befa6217ab314539a8fa381f0659bcc35
BLAKE2b-256 checksum
How to use checksums
ec5e2e0c482fca99939a9ed474d3a28e62f753d1c8fc204e00183f38da33dce9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Release files / dguad_vad-0.1.0-py3-none-any.whl

Download URL dguad_vad-0.1.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68caf4c298c2aa19bb5a7911da60c47dccf5a92e7780d980c008e0f091b17921
BLAKE2b-256 checksum
How to use checksums
3695cb981a816861b8103eb11825e590f87645fef1d28fd68b0bb4d1ecaecc4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Security for dguad-vad 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page