Install the speech-to-text demo

Install demo on client

You need install the demo on your local machine. This is the guide for a MacBook Pro installation of the client. Although DeepSpeech must be cloned, it does not need to be built or installed on the client.

To install the demo, enter:

brew install portaudio
pip install pyaudio
pip install pynput
git clone
cd DeepSpeech

The client listens for keypresses from the keyboard space and escape keys. This does not work on all devices including the MacBook Pro. To amend this, you can modify deploy/ to use ctrl for record and shift for exit:

sed -i '' s/space/ctrl/g deploy/
sed -i '' 's/Key\.esc/Key\.shift/g' deploy/

Prepare demo server

On the server, set port 8000 to listen for connections:

apt-get -y install ufw
ufw allow ssh
ufw allow 8000

It is good practice to block ports that are not in use, which UFW does automatically.

Start demo server

Again, on the server enter the following to start the demo server and replace SERVER_IP below with the IP address of the server and run this from the DeepSpeech/ directory:

 python -u deploy/ \
 --host_ip='SERVER_IP' \
 --host_port=8000 \
 --num_conv_layers=2 \
 --num_rnn_layers=3 \
 --rnn_layer_size=1024 \
 --alpha=1.15 \
 --beta=0.15 \
 --cutoff_prob=1.0 \
 --cutoff_top_n=40 \
 --use_gru=True \
 --use_gpu=False \
 --share_rnn_weights=False \
 --speech_save_dir='demo_cache' \
 --mean_std_path='models/baidu_en8k/mean_std.npz' \
 --vocab_path='models/baidu_en8k/vocab.txt' \
 --model_path='models/baidu_en8k/params.tar.gz' \
 --lang_model_path='models/lm/common_crawl_00.prune01111.trie.klm' \
 --decoding_method='ctc_beam_search' \
Previous Next