Skip to content

Commit 34098b6

Browse files
authored
Merge pull request #87 from irab/add-to-nodejs_mic_vad-doco
Add to nodejs mic vad doco
2 parents 477e18f + 27b55b3 commit 34098b6

1 file changed

Lines changed: 39 additions & 10 deletions

File tree

nodejs_mic_vad_streaming/Readme.md

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,69 @@ DeepSpeech with voice activity detection.
55

66
### Prerequisites:
77

8-
1) The example utilized the [mic](https://github.com/ashishbajaj99/mic) NPM module which requires
9-
either [sox](http://sox.sourceforge.net/) (Windows/Mac) or [arecord](http://alsa-project.org/) (Linux).
8+
This has been tested with Node LTS v14.14.
109

11-
2) Download the pre-trained DeepSpeech english model (1089MB):
10+
#### Windows/OSX
11+
12+
1. Sox - Binary available for [download here](https://sourceforge.net/projects/sox/files/sox/)
13+
1. [mic](https://github.com/ashishbajaj99/mic) NPM module
14+
1. The pre-trained DeepSpeech english model and scorer(1089MB)
1215

1316
```
17+
brew install sox # OSX only
1418
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
1519
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.scorer
1620
```
1721

18-
#### Dependency
22+
#### Linux
1923

20-
Is needed the library **libasound2-dev**
24+
1. [arecord](http://alsa-project.org/)
25+
1. The library **libasound2-dev**
26+
1. [mic](https://github.com/ashishbajaj99/mic) NPM module - which requires [sox](http://sox.sourceforge.net/)
27+
1. The pre-trained DeepSpeech english model and scorer(1089MB)
2128

2229
```
23-
$ sudo apt-get install libasound2-dev
30+
sudo apt-get install libasound2-dev alsa-utils
31+
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
32+
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.scorer
2433
```
2534

26-
#### Install:
35+
### Install:
36+
37+
Change directory to the same directory as this Readme then:
2738

2839
```
2940
npm install
3041
```
3142

32-
#### Run NodeJS server:
43+
### Run NodeJS server:
3344

3445
```
3546
node start.js
3647
```
3748

38-
#### Specify alternate DeepSpeech model path:
49+
### Specify alternate DeepSpeech model path:
3950

4051
Use the `DEEPSPEECH_MODEL` environment variable to change models.
4152

4253
```
4354
DEEPSPEECH_MODEL=~/dev/jaxcore/deepspeech-0.8.0-models/ node start.js
44-
```
55+
```
56+
57+
### Troubleshooting
58+
59+
#### OSX Mic Input
60+
If no mic input is detected while running node from a terminal, this is most like due to a lack of security permissions.
61+
If you do not see a OSX UI prompt asking for permission to allow iTerm or Terminal for permission to access the Microphone, this popup may have been dismissed in the past. As it only occurs once, the following command resets the prompts for the microphone:
62+
63+
```bash
64+
tccutil reset Microphone
65+
```
66+
67+
#### Additional Debug information
68+
69+
Addtional Debug information can be show with the following command:
70+
71+
```bash
72+
NODE_DEBUG=cluster,net,http,fs,tls,module,timers node start.js
73+
```

0 commit comments

Comments
 (0)