Dguard VAD
Based on Silero VAD and RnNoise.
Installation
pip install dguard_vad==0.1.0
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
VADclass
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
VADclass with noise suppression You just need to setdenoise=Truewhen initializingVADclass.
vad = VAD(SR, denoise=True)
Please note that: func:get_speech_probs may not work well with noise suppression.
VADIteratorclass Please refer tows_app/ws_server.pyfor more details.
Metadata
Release files for dguard-vad 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dguard_vad-0.1.1.tar.gz | 10.8 kB | Without provenance | Details for dguard_vad-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dguard_vad-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dguard_vad-0.1.1-py3-none-any.whl |
Total release size: 21.7 kB
Release files / dguard_vad-0.1.1.tar.gz
| Download URL | dguard_vad-0.1.1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
437bb97c0aaf3e59feff63de540af236f3991966e365792295ce1ae790a8f97b
|
|
BLAKE2b-256 checksum How to use checksums |
6176973ab1f56550a89e66f362737c40d2c1cb331f1a1c23e6272cc27045cf5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|
Release files / dguard_vad-0.1.1-py3-none-any.whl
| Download URL | dguard_vad-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8933a6dc0a6f386c5fad8715d6c1706256df857e7ecaf0fdad39c97e7f5971e
|
|
BLAKE2b-256 checksum How to use checksums |
b778e514f42875e6efbacb24b100ef1845d190c2634327805caa6ccf234d9f13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|
Security for dguard-vad 0.1.1
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.