Giter VIP home page Giter VIP logo

conv-vad's Introduction

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
import conv_vad

vad = conv_vad.VAD()

# Audio frame is numpy array of 1 sec, 16k, single channel audio data.
score = vad.score_speech(audio_frame)
Demo
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.