You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
poni 3970d8056a fix 7 months ago
bin first 7 months ago
lib/python3.8/site-packages first 7 months ago
README.rst first 7 months ago first 7 months ago
piratezine.html first 7 months ago
pyvenv.cfg first 7 months ago
requirements.txt first 7 months ago
speech2derive.css first 7 months ago
speech2derive.html first 7 months ago


Microphone VAD Streaming

Stream from microphone to DeepSpeech, using VAD (voice activity detection). A fairly simple example demonstrating the DeepSpeech streaming API in Python. Also useful for quick, real-time testing of models and decoding parameters.


.. code-block:: bash

pip install -r requirements.txt

Uses portaudio for microphone access, so on Linux, you may need to install its header files to compile the ``pyaudio`` package:

.. code-block:: bash

sudo apt install portaudio19-dev

Installation on MacOS may fail due to portaudio, use brew to install it:

.. code-block:: bash

brew install portaudio


.. code-block::

usage: [-h] [-v VAD_AGGRESSIVENESS] [--nospinner]
[-d DEVICE] [-r RATE]

Stream from microphone to DeepSpeech using VAD

optional arguments:
-h, --help show this help message and exit
Set aggressiveness of VAD: an integer between 0 and 3,
0 being the least aggressive about filtering out non-
speech, 3 the most aggressive. Default: 3
--nospinner Disable spinner
-w SAVEWAV, --savewav SAVEWAV
Save .wav files of utterences to given directory
-f FILE, --file FILE Read from .wav file instead of microphone
-m MODEL, --model MODEL
Path to the model (protocol buffer binary file, or
entire directory containing all standard-named files
for model)
-s SCORER, --scorer SCORER
Path to the external scorer file. Default:
-d DEVICE, --device DEVICE
Device input index (Int) as listed by
pyaudio.PyAudio.get_device_info_by_index(). If not
provided, falls back to PyAudio.get_default_device().
-r RATE, --rate RATE Input device sample rate. Default: 16000. Your device