README.md 1.5 KB
Newer Older
1 2
# Deep Speech 2 on PaddlePaddle

3
## Installation
4

5
Please replace `$PADDLE_INSTALL_DIR` with your own paddle installation directory.
6 7 8 9 10 11 12 13

```
pip install -r requirements.txt
export LD_LIBRARY_PATH=$PADDLE_INSTALL_DIR/Paddle/third_party/install/warpctc/lib:$LD_LIBRARY_PATH
```

For some machines, we also need to install libsndfile1. Details to be added.

14 15 16
## Usage

### Preparing Data
17

18
```
19
cd data
20
python librispeech.py
21
cat manifest.libri.train-* > manifest.libri.train-all
22
cd ..
23
```
24

25 26 27 28
After running librispeech.py, we have several "manifest" json files named with a prefix `manifest.libri.`. A manifest file summarizes a speech data set, with each line containing the meta data (i.e. audio filepath, transcription text, audio duration) of each audio file within the data set, in json format.

By `cat manifest.libri.train-* > manifest.libri.train-all`, we simply merge the three seperate sample sets of LibriSpeech (train-clean-100, train-clean-360, train-other-500) into one training set. This is a simple way for merging different data sets.

29 30 31 32 33 34 35 36 37 38 39
More help for arguments:

```
python librispeech.py --help
```

### Traininig

For GPU Training:

```
40
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --trainer_count 4 --train_manifest_path ./data/manifest.libri.train-all
41 42 43 44 45
```

For CPU Training:

```
46
python train.py --trainer_count 8 --use_gpu False -- train_manifest_path ./data/manifest.libri.train-all
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
```

More help for arguments:

```
python train.py --help
```

### Inferencing

```
python infer.py
```

More help for arguments:

```
python infer.py --help
```