No project description provided
Project description
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dguad_vad-0.1.0.tar.gz.
File metadata
- Download URL: dguad_vad-0.1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90ef6f6aad1d33da145bd586784aa67befa6217ab314539a8fa381f0659bcc35
|
|
| MD5 |
b08c8b3434c058e391a5e738973a8a61
|
|
| BLAKE2b-256 |
ec5e2e0c482fca99939a9ed474d3a28e62f753d1c8fc204e00183f38da33dce9
|
File details
Details for the file dguad_vad-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dguad_vad-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68caf4c298c2aa19bb5a7911da60c47dccf5a92e7780d980c008e0f091b17921
|
|
| MD5 |
46789105d1470816d57da1afcf1df6d4
|
|
| BLAKE2b-256 |
3695cb981a816861b8103eb11825e590f87645fef1d28fd68b0bb4d1ecaecc4e
|