This is a NodeJS example of recording from the microphone and streaming to DeepSpeech with voice activity detection, and sending commands via UART to HID input generator.
Based off nodejs_mic_vad_streaming from https://github.com/mozilla/DeepSpeech-examples/
Modified mic library to reduce stream chunk size and workaround for sox pipe bug.
-
The example utilized the mic NPM module which requires either sox (Windows/Mac) or arecord (Linux).
-
Download the pre-trained DeepSpeech english model (1.8GB):
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.6.0/deepspeech-0.6.0-models.tar.gz
tar xvfz deepspeech-0.6.0-models.tar.gz
npm install
node start.js
Use the DEEPSPEECH_MODEL environment variable to change models.
Use the DEEPSPEECH_LM environment variable to change langauge model.
DEEPSPEECH_MODEL=~/dev/jaxcore/deepspeech-0.6.0-models/ node start.js