https://github.com/sshh12/conv-vad
A packaged convolutional voice activity detector for noisy environments.
https://github.com/sshh12/conv-vad
convolutional-neural-networks keras melspectrogram vad voice-activity-detection
Last synced: 7 months ago
JSON representation
A packaged convolutional voice activity detector for noisy environments.
- Host: GitHub
- URL: https://github.com/sshh12/conv-vad
- Owner: sshh12
- License: mit
- Created: 2019-05-24T20:43:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-15T16:28:24.000Z (over 6 years ago)
- Last Synced: 2025-02-28T21:41:37.792Z (8 months ago)
- Topics: convolutional-neural-networks, keras, melspectrogram, vad, voice-activity-detection
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Conv VAD
> A packaged convolutional voice activity detector for noisy environments.
## Usage
#### Install
`pip install https://github.com/sshh12/Conv-VAD/releases/download/v0.1.1/conv-vad-0.1.1.tar.gz`##### API
```python
import conv_vadvad = conv_vad.VAD()
# Audio frame is numpy array of 1 sec, 16k, single channel audio data.
score = vad.score_speech(audio_frame)
```##### Demo
```python
from scipy.io import wavfile
import numpy as np
import conv_vad# Conv VAD currently only supports single channel audio at a 16k sample rate.
RATE = 16000# Create a VAD object and load model
vad = conv_vad.VAD()# Load wav as numpy array
audio = wavfile.read('test.wav')[1].astype(np.uint16)for i in range(0, audio.shape[0] - RATE, RATE):
audio_frame = audio[i:i+RATE]
# For each audio frame (1 sec) compute the speech score.
# 1 = voice, 0 = no voice
score = vad.score_speech(audio_frame)
print('Time =', i // RATE)
print('Speech Score: ', score)
```## DIY
#### Creating a dataset
`python model/label_data.py --wav_path path/to/audio.wav --data_path data`#### Training
`python model/train.py --data_path data --epochs 25`## Related
* [wiseman/py-webrtcvad](https://github.com/wiseman/py-webrtcvad)
* [belisariops/ConvVAD](https://github.com/belisariops/ConvVAD)
* [gvashkevich/vad](https://github.com/gvashkevich/vad)