Support paddle 2.x (#538)
* 2.x model
* model test pass
* fix data
* fix soundfile with flac support
* one thread dataloader test pass
* export feasture size
add trainer and utils
add setup model and dataloader
update travis using Bionic dist
* add venv; test under venv
* fix unittest; train and valid
* add train and config
* add config and train script
* fix ctc cuda memcopy error
* fix imports
* fix train valid log
* fix dataset batch shuffle shift start from 1
fix rank_zero_only decreator error
close tensorboard when train over
add decoding config and code
* test process can run
* test with decoding
* test and infer with decoding
* fix infer
* fix ctc loss
lr schedule
sortagrad
logger
* aishell egs
* refactor train
add aishell egs
* fix dataset batch shuffle and add batch sampler log
print model parameter
* fix model and ctc
* sequence_mask make all inputs zeros, which cause grad be zero, this is a bug of LessThanOp
add grad clip by global norm
add model train test notebook
* ctc loss
remove run prefix
using ord value as text id
* using unk when training
compute_loss need text ids
ord id using in test mode, which compute wer/cer
* fix tester
* add lr_deacy
refactor code
* fix tools
* fix ci
add tune
fix gru model bugs
add dataset and model test
* fix decoding
* refactor repo
fix decoding
* fix musan and rir dataset
* refactor io, loss, conv, rnn, gradclip, model, utils
* fix ci and import
* refactor model
add export jit model
* add deploy bin and test it
* rm uselss egs
* add layer tools
* refactor socket server
new model from pretrain
* remve useless
* fix instability loss and grad nan or inf for librispeech training
* fix sampler
* fix libri train.sh
* fix doc
* add license on cpp
* fix doc
* fix libri script
* fix install
* clip 5 wer 7.39, clip 400 wer 7.54, 1.8 clip 400 baseline 7.49
4 years ago
|
|
|
|
|
|
|
|
|
# Trying Live Demo with Your Own Voice
|
|
|
|
|
|
|
|
|
|
Until now, an ASR model is trained and tested qualitatively (`infer`) and quantitatively (`test`) with existing audio files. But it is not yet tested with your own speech. We build up a real-time demo ASR engine with the trained model, enabling you to test and play around with the demo, with your own voice.
|
|
|
|
|
|
|
|
|
|
First, change your directory to `examples/aishell` and `source path.sh`.
|
|
|
|
|
|
|
|
|
|
To start the demo's server, please run this in one console:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
CUDA_VISIBLE_DEVICES=0 bash local/server.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
For the machine (might not be the same machine) to run the demo's client, please do the following installation before moving on.
|
|
|
|
|
|
|
|
|
|
For example, on MAC OS X:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
brew install portaudio
|
|
|
|
|
pip install pyaudio
|
|
|
|
|
pip install keyboard
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then to start the client, please run this in another console:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
CUDA_VISIBLE_DEVICES=0 bash local/client.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Now, in the client console, press the `whitespace` key, hold, and start speaking. Until finishing your utterance, release the key to let the speech-to-text results shown in the console. To quit the client, just press `ESC` key.
|
|
|
|
|
|
|
|
|
|
Notice that `deepspeech/exps/deepspeech2/deploy/client.py` must be run on a machine with a microphone device, while `deepspeech/exps/deepspeech2/deploy/server.py` could be run on one without any audio recording hardware, e.g. any remote server machine. Just be careful to set the `host_ip` and `host_port` argument with the actual accessible IP address and port, if the server and client are running with two separate machines. Nothing should be done if they are running on one single machine.
|
|
|
|
|
|
|
|
|
|
Please also refer to `examples/aishell/local/server.sh`, which will first download a pre-trained Chinese model (trained with AISHELL1) and then start the demo server with the model. With running `examples/aishell/local/client.sh`, you can speak Chinese to test it. If you would like to try some other models, just update `--checkpoint_path` argument in the script.
|