1Metadata-Version: 1.1 2Name: webrtcvad 3Version: 2.0.10 4Summary: Python interface to the Google WebRTC Voice Activity Detector (VAD) 5Home-page: https://github.com/wiseman/py-webrtcvad 6Author: John Wiseman 7Author-email: jjwiseman@gmail.com 8License: MIT 9Description: .. image:: https://travis-ci.org/wiseman/py-webrtcvad.svg?branch=master 10 :target: https://travis-ci.org/wiseman/py-webrtcvad 11 12 py-webrtcvad 13 ============ 14 15 This is a python interface to the WebRTC Voice Activity Detector 16 (VAD). It is compatible with Python 2 and Python 3. 17 18 A `VAD <https://en.wikipedia.org/wiki/Voice_activity_detection>`_ 19 classifies a piece of audio data as being voiced or unvoiced. It can 20 be useful for telephony and speech recognition. 21 22 The VAD that Google developed for the `WebRTC <https://webrtc.org/>`_ 23 project is reportedly one of the best available, being fast, modern 24 and free. 25 26 How to use it 27 ------------- 28 29 0. Install the webrtcvad module:: 30 31 pip install webrtcvad 32 33 1. Create a ``Vad`` object:: 34 35 import webrtcvad 36 vad = webrtcvad.Vad() 37 38 2. Optionally, set its aggressiveness mode, which is an integer 39 between 0 and 3. 0 is the least aggressive about filtering out 40 non-speech, 3 is the most aggressive. (You can also set the mode 41 when you create the VAD, e.g. ``vad = webrtcvad.Vad(3)``):: 42 43 vad.set_mode(1) 44 45 3. Give it a short segment ("frame") of audio. The WebRTC VAD only 46 accepts 16-bit mono PCM audio, sampled at 8000, 16000, or 32000 Hz. 47 A frame must be either 10, 20, or 30 ms in duration:: 48 49 # Run the VAD on 10 ms of silence. The result should be False. 50 sample_rate = 16000 51 frame_duration = 10 # ms 52 frame = b'\x00\x00' * (sample_rate * frame_duration / 1000) 53 print 'Contains speech: %s' % (vad.is_speech(frame, sample_rate) 54 55 56 See `example.py 57 <https://github.com/wiseman/py-webrtcvad/blob/master/example.py>`_ for 58 a more detailed example that will process a .wav file, find the voiced 59 segments, and write each one as a separate .wav. 60 61 62 How to run unit tests 63 --------------------- 64 65 To run unit tests:: 66 67 pip install -e ".[dev]" 68 python setup.py test 69 70Keywords: speechrecognition asr voiceactivitydetection vad webrtc 71Platform: UNKNOWN 72Classifier: Development Status :: 4 - Beta 73Classifier: Intended Audience :: Developers 74Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence 75Classifier: Topic :: Scientific/Engineering :: Information Analysis 76Classifier: Topic :: Scientific/Engineering :: Human Machine Interfaces 77Classifier: License :: OSI Approved :: MIT License 78Classifier: Programming Language :: Python :: 2 79Classifier: Programming Language :: Python :: 2.7 80Classifier: Programming Language :: Python :: 3 81Classifier: Programming Language :: Python :: 3.2 82Classifier: Programming Language :: Python :: 3.3 83Classifier: Programming Language :: Python :: 3.4 84Classifier: Programming Language :: Python :: 3.5 85