DeepSpeech-examples/electron
Hadran Ayoub 49b9832187 Bump version from 0.8.0 to 0.9.3 in branch r0.9
Bump DeepSpeech version from 0.8.0 to 0.9.3 in branch r0.9
2021-01-06 18:48:06 +01:00
..
public Bump version from 0.8.0 to 0.9.3 in branch r0.9 2021-01-06 18:48:06 +01:00
src add electron example 2020-08-04 14:50:23 +02:00
.gitignore add electron unit test, move local model files to /models directory 2020-08-04 14:50:23 +02:00
Readme.md Bump version from 0.8.0 to 0.9.3 in branch r0.9 2021-01-06 18:48:06 +01:00
package-lock.json Bump version from 0.8.0 to 0.9.3 in branch r0.9 2021-01-06 18:48:06 +01:00
package.json Bump version from 0.8.0 to 0.9.3 in branch r0.9 2021-01-06 18:48:06 +01:00
test.sh Proper exit status 2020-08-04 19:51:16 +02:00

Readme.md

DeepSpeech Electron example

This is an example of DeepSpeech running in an Electron app with a ReactJS front-end and processing .wav files.

Install

Install NPM modules:

npm install
npm run rebuild

Download and extract audio files to /public directory

wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/audio-0.9.3.tar.gz
tar xfvz audio-0.9.3.tar.gz -C ./public/

(Optional) Download or softlink DeepSpeech 0.9.3 model files to the root of the project:

mkdir models
cd models
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.pbmm
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
cd ..

If the files do not exist, they will be downloaded.

Run

Run development version (Mac/Linux):

npm run dev

Run development version (Windows):

export BROWSER=none
npm run dev-win

Package

Build distributable package (Mac/Linux):

npm run dist

Build distributable package (Windows installer):

export BROWSER=none
npm run dist-win

Test the (dmg/appimage/exe) package file that has been generated in /dist.

Uninstall

The model files download to the following directories and must be deleted manually

  • MacOSX: ~/Library/Application\ Support/deepspeech-electron
  • Linux: ~/.config/deepspeech-electron
  • Windows: ~/AppData/Roaming/deepspeech-electron