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
This commit is contained in:
Родитель
2b6ca883c0
Коммит
49b9832187
|
@ -8,15 +8,15 @@ Android demo application that streams audio from the microphone to deepspeech an
|
||||||
|
|
||||||
Download the pre-trained English model and extract it:
|
Download the pre-trained English model and extract it:
|
||||||
```
|
```
|
||||||
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.tflite
|
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.tflite
|
||||||
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.scorer
|
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
|
||||||
```
|
```
|
||||||
|
|
||||||
Move the model files `deepspeech-0.8.0-models.pbmm`, `deepspeech-0.8.0-models.scorer`, to the demo application's data directory on your android device.
|
Move the model files `deepspeech-0.9.3-models.pbmm`, `deepspeech-0.9.3-models.scorer`, to the demo application's data directory on your android device.
|
||||||
Mind that the data directory will only be present after installing and launching the app once.
|
Mind that the data directory will only be present after installing and launching the app once.
|
||||||
|
|
||||||
```
|
```
|
||||||
adb push deepspeech-0.8.0-models.tflite deepspeech-0.8.0-models.scorer /storage/emulated/0/Android/data/org.deepspeechdemo/files/
|
adb push deepspeech-0.9.3-models.tflite deepspeech-0.9.3-models.scorer /storage/emulated/0/Android/data/org.deepspeechdemo/files/
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also copy the files from your file browser to the device.
|
You can also copy the files from your file browser to the device.
|
||||||
|
|
|
@ -34,7 +34,7 @@ dependencies {
|
||||||
implementation 'androidx.core:core-ktx:1.0.2'
|
implementation 'androidx.core:core-ktx:1.0.2'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||||
|
|
||||||
implementation 'org.mozilla.deepspeech:libdeepspeech:0.8.0'
|
implementation 'org.mozilla.deepspeech:libdeepspeech:0.9.3'
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||||||
|
|
|
@ -21,8 +21,8 @@ class MainActivity : AppCompatActivity() {
|
||||||
private var transcriptionThread: Thread? = null
|
private var transcriptionThread: Thread? = null
|
||||||
private var isRecording: AtomicBoolean = AtomicBoolean(false)
|
private var isRecording: AtomicBoolean = AtomicBoolean(false)
|
||||||
|
|
||||||
private val TFLITE_MODEL_FILENAME = "deepspeech-0.8.0-models.tflite"
|
private val TFLITE_MODEL_FILENAME = "deepspeech-0.9.3-models.tflite"
|
||||||
private val SCORER_FILENAME = "deepspeech-0.8.0-models.scorer"
|
private val SCORER_FILENAME = "deepspeech-0.9.3-models.scorer"
|
||||||
|
|
||||||
private fun checkAudioPermission() {
|
private fun checkAudioPermission() {
|
||||||
// Permission is automatically granted on SDK < 23 upon installation.
|
// Permission is automatically granted on SDK < 23 upon installation.
|
||||||
|
|
|
@ -128,13 +128,13 @@ Running via the GPU takes half the time of using the CPU and has good results.
|
||||||
|
|
||||||
# Driver command line
|
# Driver command line
|
||||||
|
|
||||||
`./driver.py --model c:/Users/jmike/Documents/GitHub/DeepSpeech/deepspeech-0.8.0-models.pbmm --scorer c:/Users/jmike/Documents/GitHub/DeepSpeech/deepspeech-0.8.0-models.scorer --dirname c:/Users/jmike/Downloads/podcast/`
|
`./driver.py --model c:/Users/jmike/Documents/GitHub/DeepSpeech/deepspeech-0.9.3-models.pbmm --scorer c:/Users/jmike/Documents/GitHub/DeepSpeech/deepspeech-0.9.3-models.scorer --dirname c:/Users/jmike/Downloads/podcast/`
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
|
|
||||||
It will then run the individual commands like :
|
It will then run the individual commands like :
|
||||||
|
|
||||||
`deepspeech --model C:\Users\jmike\Documents\GitHub\DeepSpeech\deepspeech-0.8.0-models.pbmm --scorer C:\Users\jmike\Documents\GitHub\DeepSpeech\deepspeech-0.8.0-models.scorer --audio 'C:\Users\jmike\Downloads\podcast\45374977-48000-2-24d9a365625bb.mp3.wav' --json`
|
`deepspeech --model C:\Users\jmike\Documents\GitHub\DeepSpeech\deepspeech-0.9.3-models.pbmm --scorer C:\Users\jmike\Documents\GitHub\DeepSpeech\deepspeech-0.9.3-models.scorer --audio 'C:\Users\jmike\Downloads\podcast\45374977-48000-2-24d9a365625bb.mp3.wav' --json`
|
||||||
|
|
||||||
|
|
||||||
Websites referenced:
|
Websites referenced:
|
||||||
|
|
|
@ -19,12 +19,12 @@ import delegator
|
||||||
@click.option("--ext", default=".mp3")
|
@click.option("--ext", default=".mp3")
|
||||||
@click.option(
|
@click.option(
|
||||||
"--model",
|
"--model",
|
||||||
default="deepspeech-0.8.0-models.pbmm",
|
default="deepspeech-0.9.3-models.pbmm",
|
||||||
type=click.Path(exists=True, resolve_path=True),
|
type=click.Path(exists=True, resolve_path=True),
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--scorer",
|
"--scorer",
|
||||||
default="deepspeech-0.8.0-models.scorer",
|
default="deepspeech-0.9.3-models.scorer",
|
||||||
type=click.Path(exists=True, resolve_path=True),
|
type=click.Path(exists=True, resolve_path=True),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ cachetools==4.1.0
|
||||||
certifi==2020.4.5.2
|
certifi==2020.4.5.2
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
click==7.1.2
|
click==7.1.2
|
||||||
deepspeech==0.8.0
|
deepspeech==0.9.3
|
||||||
delegator.py @ git+https://github.com/amitt001/delegator.py.git@194aa92543fbdbfbae0bcc24ca217819a7805da2
|
delegator.py @ git+https://github.com/amitt001/delegator.py.git@194aa92543fbdbfbae0bcc24ca217819a7805da2
|
||||||
flask==1.1.2
|
flask==1.1.2
|
||||||
gast==0.2.2
|
gast==0.2.2
|
||||||
|
|
|
@ -14,17 +14,17 @@ npm run rebuild
|
||||||
Download and extract audio files to `/public` directory
|
Download and extract audio files to `/public` directory
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/audio-0.8.0.tar.gz
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/audio-0.9.3.tar.gz
|
||||||
tar xfvz audio-0.8.0.tar.gz -C ./public/
|
tar xfvz audio-0.9.3.tar.gz -C ./public/
|
||||||
```
|
```
|
||||||
|
|
||||||
(Optional) Download or softlink DeepSpeech 0.8.0 model files to the root of the project:
|
(Optional) Download or softlink DeepSpeech 0.9.3 model files to the root of the project:
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir models
|
mkdir models
|
||||||
cd models
|
cd models
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
|
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.8.0/deepspeech-0.8.0-models.scorer
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
|
||||||
cd ..
|
cd ..
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -4791,8 +4791,8 @@
|
||||||
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
|
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
|
||||||
},
|
},
|
||||||
"deepspeech": {
|
"deepspeech": {
|
||||||
"version": "0.8.0",
|
"version": "0.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/deepspeech/-/deepspeech-0.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/deepspeech/-/deepspeech-0.9.3.tgz",
|
||||||
"integrity": "sha512-jqU+NbXVZnS+okMgoiOhJz22RaHSmvIjmHaRu7IZ0xBDQbcqNGff4GXk4a5etfSXm3bXddRtBlfFr5KyQExjbw==",
|
"integrity": "sha512-jqU+NbXVZnS+okMgoiOhJz22RaHSmvIjmHaRu7IZ0xBDQbcqNGff4GXk4a5etfSXm3bXddRtBlfFr5KyQExjbw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"argparse": "1.0.x",
|
"argparse": "1.0.x",
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"deepspeech": "^0.8.0",
|
"deepspeech": "^0.9.3",
|
||||||
"electron-is-dev": "^1.1.0",
|
"electron-is-dev": "^1.1.0",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"node-abi": "^2.18.0",
|
"node-abi": "^2.18.0",
|
||||||
|
|
|
@ -7,7 +7,7 @@ const {getModel} = require('./recognize-wav');
|
||||||
|
|
||||||
let appDataPath;
|
let appDataPath;
|
||||||
|
|
||||||
if (fs.existsSync(path.resolve(__dirname, '../models/deepspeech-0.8.0-models.pbmm'))) {
|
if (fs.existsSync(path.resolve(__dirname, '../models/deepspeech-0.9.3-models.pbmm'))) {
|
||||||
// if the deepspeech model was found at the root, use that directory
|
// if the deepspeech model was found at the root, use that directory
|
||||||
appDataPath = path.resolve(__dirname, '../models');
|
appDataPath = path.resolve(__dirname, '../models');
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,15 @@ const download = require('./download');
|
||||||
|
|
||||||
// return the deepspeech model or download it if it is not found
|
// return the deepspeech model or download it if it is not found
|
||||||
function getModel(appDataPath, callback) {
|
function getModel(appDataPath, callback) {
|
||||||
let modelPath = path.resolve(appDataPath, 'deepspeech-0.8.0-models.pbmm');
|
let modelPath = path.resolve(appDataPath, 'deepspeech-0.9.3-models.pbmm');
|
||||||
let scorerPath = path.resolve(appDataPath, 'deepspeech-0.8.0-models.scorer');
|
let scorerPath = path.resolve(appDataPath, 'deepspeech-0.9.3-models.scorer');
|
||||||
if (fs.existsSync(modelPath) && fs.existsSync(scorerPath)) {
|
if (fs.existsSync(modelPath) && fs.existsSync(scorerPath)) {
|
||||||
callback(createModel(modelPath, scorerPath));
|
callback(createModel(modelPath, scorerPath));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// if the model files do not exist, download and save them to AppData path
|
// if the model files do not exist, download and save them to AppData path
|
||||||
console.log('\nDOWNLOADING MODEL TO: '+appDataPath+'\n');
|
console.log('\nDOWNLOADING MODEL TO: '+appDataPath+'\n');
|
||||||
const downloadPath = 'https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models';
|
const downloadPath = 'https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models';
|
||||||
download(downloadPath+'.pbmm', modelPath, function() {
|
download(downloadPath+'.pbmm', modelPath, function() {
|
||||||
download(downloadPath+'.scorer', scorerPath, function() {
|
download(downloadPath+'.scorer', scorerPath, function() {
|
||||||
callback(createModel(modelPath, scorerPath));
|
callback(createModel(modelPath, scorerPath));
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^1.0.10",
|
"argparse": "^1.0.10",
|
||||||
"deepspeech": "0.8.0",
|
"deepspeech": "0.9.3",
|
||||||
"node-vad": "^1.1.1",
|
"node-vad": "^1.1.1",
|
||||||
"util": "^0.11.1"
|
"util": "^0.11.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,14 +11,14 @@ pushd ${THIS}
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
node ./index.js --audio $HOME/DeepSpeech/audio/2830-3980-0043.wav \
|
node ./index.js --audio $HOME/DeepSpeech/audio/2830-3980-0043.wav \
|
||||||
--scorer $HOME/DeepSpeech/models/deepspeech-0.8.0-models.scorer \
|
--scorer $HOME/DeepSpeech/models/deepspeech-0.9.3-models.scorer \
|
||||||
--model $HOME/DeepSpeech/models/deepspeech-0.8.0-models.pbmm
|
--model $HOME/DeepSpeech/models/deepspeech-0.9.3-models.pbmm
|
||||||
|
|
||||||
node ./index.js --audio $HOME/DeepSpeech/audio/4507-16021-0012.wav \
|
node ./index.js --audio $HOME/DeepSpeech/audio/4507-16021-0012.wav \
|
||||||
--scorer $HOME/DeepSpeech/models/deepspeech-0.8.0-models.scorer \
|
--scorer $HOME/DeepSpeech/models/deepspeech-0.9.3-models.scorer \
|
||||||
--model $HOME/DeepSpeech/models/deepspeech-0.8.0-models.pbmm
|
--model $HOME/DeepSpeech/models/deepspeech-0.9.3-models.pbmm
|
||||||
|
|
||||||
node ./index.js --audio $HOME/DeepSpeech/audio/8455-210777-0068.wav \
|
node ./index.js --audio $HOME/DeepSpeech/audio/8455-210777-0068.wav \
|
||||||
--scorer $HOME/DeepSpeech/models/deepspeech-0.8.0-models.scorer \
|
--scorer $HOME/DeepSpeech/models/deepspeech-0.9.3-models.scorer \
|
||||||
--model $HOME/DeepSpeech/models/deepspeech-0.8.0-models.pbmm
|
--model $HOME/DeepSpeech/models/deepspeech-0.9.3-models.pbmm
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
deepspeech~=0.8.0
|
deepspeech~=0.9.3
|
||||||
pyaudio~=0.2.11
|
pyaudio~=0.2.11
|
||||||
webrtcvad~=2.0.10
|
webrtcvad~=2.0.10
|
||||||
halo~=0.0.18
|
halo~=0.0.18
|
||||||
|
|
|
@ -13,7 +13,7 @@ pushd ${THIS}
|
||||||
pulseaudio &
|
pulseaudio &
|
||||||
|
|
||||||
python mic_vad_streaming.py \
|
python mic_vad_streaming.py \
|
||||||
--model $HOME/DeepSpeech/models/deepspeech-0.8.0-models.pbmm \
|
--model $HOME/DeepSpeech/models/deepspeech-0.9.3-models.pbmm \
|
||||||
--scorer $HOME/DeepSpeech/models/deepspeech-0.8.0-models.scorer \
|
--scorer $HOME/DeepSpeech/models/deepspeech-0.9.3-models.scorer \
|
||||||
--file $HOME/DeepSpeech/audio/2830-3980-0043.wav
|
--file $HOME/DeepSpeech/audio/2830-3980-0043.wav
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace DeepSpeechWPF
|
||||||
{
|
{
|
||||||
//Register instance of DeepSpeech
|
//Register instance of DeepSpeech
|
||||||
DeepSpeechClient.DeepSpeech deepSpeechClient =
|
DeepSpeechClient.DeepSpeech deepSpeechClient =
|
||||||
new DeepSpeechClient.DeepSpeech("deepspeech-0.8.0-models.pbmm");
|
new DeepSpeechClient.DeepSpeech("deepspeech-0.9.3-models.pbmm");
|
||||||
|
|
||||||
SimpleIoc.Default.Register<IDeepSpeech>(() => deepSpeechClient);
|
SimpleIoc.Default.Register<IDeepSpeech>(() => deepSpeechClient);
|
||||||
SimpleIoc.Default.Register<MainWindowViewModel>();
|
SimpleIoc.Default.Register<MainWindowViewModel>();
|
||||||
|
|
|
@ -10,7 +10,7 @@ Interface to both the libs is provided through NIM code.
|
||||||
## PREREQUISITIES :
|
## PREREQUISITIES :
|
||||||
* ```libdeepspeech.so```
|
* ```libdeepspeech.so```
|
||||||
|
|
||||||
Go to the [releases](https://github.com/mozilla/DeepSpeech/releases/tag/v0.8.0) page and download the native client package based on your OS and CPU architecture.
|
Go to the [releases](https://github.com/mozilla/DeepSpeech/releases/tag/v0.9.3) page and download the native client package based on your OS and CPU architecture.
|
||||||
|
|
||||||
Extract the ``libdeepspeech.so`` and put into the subdirectory depending on OS of native Client used.
|
Extract the ``libdeepspeech.so`` and put into the subdirectory depending on OS of native Client used.
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@ sudo apt-get install libasound2
|
||||||
2) Download the pre-trained DeepSpeech english model (1089MB) and Scorer Package(~900MB):
|
2) Download the pre-trained DeepSpeech english model (1089MB) and Scorer Package(~900MB):
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
|
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.8.0/deepspeech-0.8.0-models.scorer
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ Minimalistic example to demonstrate the DeepSpeech streaming API in NIM.Raw aud
|
||||||
2) Download the pre-trained DeepSpeech english model (1089MB):
|
2) Download the pre-trained DeepSpeech english model (1089MB):
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
|
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.8.0/deepspeech-0.8.0-models.scorer
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ either [sox](http://sox.sourceforge.net/) (Windows/Mac) or [arecord](http://alsa
|
||||||
2) Download the pre-trained DeepSpeech english model (1089MB):
|
2) Download the pre-trained DeepSpeech english model (1089MB):
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
|
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.8.0/deepspeech-0.8.0-models.scorer
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Dependency
|
#### Dependency
|
||||||
|
@ -40,5 +40,5 @@ node start.js
|
||||||
Use the `DEEPSPEECH_MODEL` environment variable to change models.
|
Use the `DEEPSPEECH_MODEL` environment variable to change models.
|
||||||
|
|
||||||
```
|
```
|
||||||
DEEPSPEECH_MODEL=~/dev/jaxcore/deepspeech-0.8.0-models/ node start.js
|
DEEPSPEECH_MODEL=~/dev/jaxcore/deepspeech-0.9.3-models/ node start.js
|
||||||
```
|
```
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"deepspeech": "^0.8.0",
|
"deepspeech": "^0.9.3",
|
||||||
"mic": "^2.1.2",
|
"mic": "^2.1.2",
|
||||||
"node-vad": "^1.1.4",
|
"node-vad": "^1.1.4",
|
||||||
"speaker": "^0.5.1",
|
"speaker": "^0.5.1",
|
||||||
|
|
|
@ -10,7 +10,7 @@ if (process.env.DEEPSPEECH_MODEL) {
|
||||||
DEEPSPEECH_MODEL = process.env.DEEPSPEECH_MODEL;
|
DEEPSPEECH_MODEL = process.env.DEEPSPEECH_MODEL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEEPSPEECH_MODEL = __dirname + '/deepspeech-0.8.0-models';
|
DEEPSPEECH_MODEL = __dirname + '/deepspeech-0.9.3-models';
|
||||||
}
|
}
|
||||||
|
|
||||||
let SILENCE_THRESHOLD = 200; // how many milliseconds of inactivity before processing the audio
|
let SILENCE_THRESHOLD = 200; // how many milliseconds of inactivity before processing the audio
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
Download the pre-trained model (1.8GB):
|
Download the pre-trained model (1.8GB):
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
|
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.8.0/deepspeech-0.8.0-models.scorer
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit references to models path if necessary:
|
Edit references to models path if necessary:
|
||||||
|
|
||||||
```
|
```
|
||||||
let modelPath = './models/deepspeech-0.8.0-models.pbmm';
|
let modelPath = './models/deepspeech-0.9.3-models.pbmm';
|
||||||
let scorerPath = './models/deepspeech-0.8.0-models.scorer';
|
let scorerPath = './models/deepspeech-0.9.3-models.scorer';
|
||||||
```
|
```
|
||||||
|
|
||||||
Install Sox (for .wav file loading):
|
Install Sox (for .wav file loading):
|
||||||
|
@ -23,8 +23,8 @@ brew install sox
|
||||||
Download test audio files:
|
Download test audio files:
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/audio-0.8.0.tar.gz
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/audio-0.9.3.tar.gz
|
||||||
tar xfvz audio-0.8.0.tar.gz
|
tar xfvz audio-0.9.3.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
Install NPM dependencies:
|
Install NPM dependencies:
|
||||||
|
|
|
@ -5,13 +5,13 @@ const MemoryStream = require('memory-stream');
|
||||||
const Duplex = require('stream').Duplex;
|
const Duplex = require('stream').Duplex;
|
||||||
const Wav = require('node-wav');
|
const Wav = require('node-wav');
|
||||||
|
|
||||||
let modelPath = './models/deepspeech-0.8.0-models.pbmm';
|
let modelPath = './models/deepspeech-0.9.3-models.pbmm';
|
||||||
|
|
||||||
let model = new DeepSpeech.Model(modelPath);
|
let model = new DeepSpeech.Model(modelPath);
|
||||||
|
|
||||||
let desiredSampleRate = model.sampleRate();
|
let desiredSampleRate = model.sampleRate();
|
||||||
|
|
||||||
let scorerPath = './models/deepspeech-0.8.0-models.scorer';
|
let scorerPath = './models/deepspeech-0.9.3-models.scorer';
|
||||||
|
|
||||||
model.enableExternalScorer(scorerPath);
|
model.enableExternalScorer(scorerPath);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^1.0.10",
|
"argparse": "^1.0.10",
|
||||||
"deepspeech": "0.8.0",
|
"deepspeech": "0.9.3",
|
||||||
"node-wav": "0.0.2",
|
"node-wav": "0.0.2",
|
||||||
"sox-stream": "^2.0.3",
|
"sox-stream": "^2.0.3",
|
||||||
"util": "^0.11.1"
|
"util": "^0.11.1"
|
||||||
|
|
|
@ -159,20 +159,20 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DeepSpeech">
|
<PackageReference Include="DeepSpeech">
|
||||||
<Version>0.8.0</Version>
|
<Version>0.9.3</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||||
<Version>6.2.9</Version>
|
<Version>6.2.9</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<Reference Include="DeepSpeechClient, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
<Reference Include="DeepSpeechClient, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||||
<HintPath>..\packages\DeepSpeech.0.8.0\lib\net46\DeepSpeechClient.dll</HintPath>
|
<HintPath>..\packages\DeepSpeech.0.9.3\lib\net46\DeepSpeechClient.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="models\deepspeech-0.8.0-models.pbmm">
|
<Content Include="models\deepspeech-0.9.3-models.pbmm">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="models\deepspeech-0.8.0-models.scorer">
|
<Content Include="models\deepspeech-0.9.3-models.scorer">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -65,8 +65,8 @@ namespace DeepSpeechUWP
|
||||||
{
|
{
|
||||||
string projectFolder = Directory.GetCurrentDirectory();
|
string projectFolder = Directory.GetCurrentDirectory();
|
||||||
string modelsFolder = Path.Combine(projectFolder, "models");
|
string modelsFolder = Path.Combine(projectFolder, "models");
|
||||||
string acousticModelPath = Path.Combine(modelsFolder, "deepspeech-0.8.0-models.pbmm");
|
string acousticModelPath = Path.Combine(modelsFolder, "deepspeech-0.9.3-models.pbmm");
|
||||||
string scorerPath = Path.Combine(modelsFolder, "deepspeech-0.8.0-models.scorer");
|
string scorerPath = Path.Combine(modelsFolder, "deepspeech-0.9.3-models.scorer");
|
||||||
|
|
||||||
client = new DeepSpeechClient.DeepSpeech(acousticModelPath);
|
client = new DeepSpeechClient.DeepSpeech(acousticModelPath);
|
||||||
client.EnableExternalScorer(scorerPath);
|
client.EnableExternalScorer(scorerPath);
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
deepspeech==0.8.0
|
deepspeech==0.9.3
|
||||||
webrtcvad
|
webrtcvad
|
||||||
pyqt5
|
pyqt5
|
||||||
|
|
|
@ -6,8 +6,8 @@ to a NodeJS server and transmitting the DeepSpeech results back to the browser.
|
||||||
#### Download the pre-trained model (1.8GB):
|
#### Download the pre-trained model (1.8GB):
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
|
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.8.0/deepspeech-0.8.0-models.scorer
|
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Install:
|
#### Install:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"@testing-library/user-event": "^7.1.2",
|
"@testing-library/user-event": "^7.1.2",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"chai-http": "^4.3.0",
|
"chai-http": "^4.3.0",
|
||||||
"deepspeech": "^0.8.0",
|
"deepspeech": "^0.9.3",
|
||||||
"defaults": "^1.0.3",
|
"defaults": "^1.0.3",
|
||||||
"mocha": "^6.1.4",
|
"mocha": "^6.1.4",
|
||||||
"node-vad": "^1.1.4",
|
"node-vad": "^1.1.4",
|
||||||
|
|
|
@ -3,7 +3,7 @@ const socketIO = require('socket.io');
|
||||||
const DeepSpeech = require('deepspeech');
|
const DeepSpeech = require('deepspeech');
|
||||||
const VAD = require('node-vad');
|
const VAD = require('node-vad');
|
||||||
|
|
||||||
let DEEPSPEECH_MODEL = __dirname + '/deepspeech-0.8.0-models'; // path to deepspeech english model directory
|
let DEEPSPEECH_MODEL = __dirname + '/deepspeech-0.9.3-models'; // path to deepspeech english model directory
|
||||||
|
|
||||||
let SILENCE_THRESHOLD = 200; // how many milliseconds of inactivity before processing the audio
|
let SILENCE_THRESHOLD = 200; // how many milliseconds of inactivity before processing the audio
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ pushd ${THIS}
|
||||||
npm install $(get_npm_package_url)
|
npm install $(get_npm_package_url)
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
ln -s $HOME/DeepSpeech/models deepspeech-0.8.0-models
|
ln -s $HOME/DeepSpeech/models deepspeech-0.9.3-models
|
||||||
|
|
||||||
yarn run test:client
|
yarn run test:client
|
||||||
yarn run test:server
|
yarn run test:server
|
||||||
|
|
Загрузка…
Ссылка в новой задаче