From 9955f05058ce8f319adf3388e24e243db0002705 Mon Sep 17 00:00:00 2001 From: Xinghai Sun Date: Thu, 3 Aug 2017 19:00:17 +0800 Subject: [PATCH] Remove pynput and pyaudio packages from requriements.txt and add installation tips to README.md. --- deep_speech_2/README.md | 21 +++++++++++++++++++-- deep_speech_2/demo_server.py | 1 - deep_speech_2/requirements.txt | 2 -- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/deep_speech_2/README.md b/deep_speech_2/README.md index 27dc6488..39dba0cd 100755 --- a/deep_speech_2/README.md +++ b/deep_speech_2/README.md @@ -7,7 +7,7 @@ - **Python = 2.7** only supported; - **cuDNN >= 6.0** is required to utilize NVIDIA GPU platform in the installation of PaddlePaddle, and the **CUDA toolkit** with proper version suitable for cuDNN. The cuDNN library below 6.0 is found to yield a fatal error in batch normalization when handling utterances with long duration in inference. -### Setup +### Setup for Training & Evaluation ``` sh setup.sh @@ -16,6 +16,19 @@ export LD_LIBRARY_PATH=$PADDLE_INSTALL_DIR/Paddle/third_party/install/warpctc/li Please replace `$PADDLE_INSTALL_DIR` with your own paddle installation directory. +### Setup for Demo + +Please do the following extra installation before run `demo_client.py` to try the realtime ASR demo. However there is no need to install them for the computer running the demo's server-end (`demo_server.py`). For details of running the ASR demo, please refer to the [section](#playing-with-the-asr-demo). + +For example, on MAC OS X: + +``` +brew install portaudio +pip install pyaudio +pip install pynput +``` + + ## Usage ### Preparing Data @@ -158,4 +171,8 @@ python demo_client.py ``` On the client console, press and hold "white-space" key and start talking, then release the "white-space" key when you finish your speech. The decoding results (infered transcription) will be displayed. -If you would like to start server and client in two machines. Please use `--host_ip` and `--host_port` to indicate the actual IP address and port, for both `demo_server.py` and `demo_client.py`. +If you would like to start the server and the client in two machines. Please use `--host_ip` and `--host_port` to indicate the actual IP address and port, for both `demo_server.py` and `demo_client.py`. + +Notice that `demo_client.py` should be started in your local computer with microphone hardware, while `demo_server.py` can be started in any remote server as well as the same local computer. IP address and port should be properly set for server-client communication. + +For running `demo_client.py`, please first finish the [extra installation steps](#setup-for-demo). diff --git a/deep_speech_2/demo_server.py b/deep_speech_2/demo_server.py index 8a55e726..c7e7e94a 100644 --- a/deep_speech_2/demo_server.py +++ b/deep_speech_2/demo_server.py @@ -8,7 +8,6 @@ from time import gmtime, strftime import SocketServer import struct import wave -import pyaudio import paddle.v2 as paddle from utils import print_arguments from data_utils.data import DataGenerator diff --git a/deep_speech_2/requirements.txt b/deep_speech_2/requirements.txt index 9297f659..131f75ff 100644 --- a/deep_speech_2/requirements.txt +++ b/deep_speech_2/requirements.txt @@ -3,5 +3,3 @@ resampy==0.1.5 SoundFile==0.9.0.post1 python_speech_features https://github.com/luotao1/kenlm/archive/master.zip -pyaudio -pynput -- GitLab