This is a demonstration project that shows how the Media Stream API in Chromium can be brought together with the Google's Cloud Speech API to enable speech recognition in an Electron application.
The Media Stream API is used to capture audio from the user's microphone. This project does not have a native SoX dependency like other node-only integrations.
You will need the c/c++ toolchain for building node/electron native add-ons.
The snowboy native add-on has some build dependencies:
sudo apt-get install libmagic-dev libatlas-base-dev
Clone and install
git clone https://github.com/mattcollier/electron-voice-recognition.git
npm install
# the grpc native binary folder needs to be renamed
./rename-grpc-binary.sh
npm start
After launching the application, speak the default hotword "Alexa" followed immediately by up to 10 seconds of speech that will be transcribed by Google Cloud Speech.