GithubHelp home page GithubHelp logo

vad-python's Introduction

IMPORTANT NOTE

I'm not working on this project anymore. I advise everyone curious about voice detection to have a look at some more modern approaches using deep learning, like:

Voice Activity Detector

Python code to apply voice activity detector to wave file. Voice activity detector based on ration between energy in speech band and total energy.

Requirements

  • numpy
  • scipy
  • matplotlib
  • tkinter (sudo apt install python3-tk)

Basic Idea

Input audio data treated as following:

  1. Convert stereo to mono.
  2. Move a window of 20ms along the audio data.
  3. Calculate the ratio between energy of speech band and total energy for window.
  4. If ratio is more than threshold (0.6 by default) label windows as speech.
  5. Apply median filter with length of 0.5s to smooth detected speech regions.
  6. Represent speech regions as intervals of time.

How To

Create object:

  1. import vad module.
  2. create instance of class VoiceActivityDetector with full path to wave file.
  3. run method to detect speech regions.
  4. optionally, plot original wave data and detected speech region.

Example python script which saves speech intervals in json file:

./detectVoiceInWave.py ./wav-sample.wav ./results.json

Example python code to plot detected speech regions:

from vad import VoiceActivityDetector

filename = '/Users/user/wav-sample.wav'
v = VoiceActivityDetector(filename)
v.plot_detected_speech_regions()

Alexander USOLTSEV 2015 (c) MIT License

vad-python's People

Contributors

a-n-rose avatar marsbroshok avatar mayank25402 avatar surajmahendra2552 avatar umagunturi avatar yapro avatar

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.