README.md 801 字节
Newer Older
Y
Yibing Liu 已提交
1
### Installation
2
The setup of the decoder for deployment depends on the source code of [kenlm](https://github.com/kpu/kenlm/) and [openfst](http://www.openfst.org/twiki/bin/view/FST/WebHome), first clone kenlm and download openfst to current directory (i.e., `deep_speech_2/deploy`)
Y
Yibing Liu 已提交
3 4 5

```shell
git clone https://github.com/kpu/kenlm.git
6 7
wget http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.6.3.tar.gz
tar -xzvf openfst-1.6.3.tar.gz
Y
Yibing Liu 已提交
8 9
```

10 11
Compiling for python interface requires swig, please make sure swig being installed.

Y
Yibing Liu 已提交
12 13 14
Then run the setup

```shell
15
python setup.py install
Y
Yibing Liu 已提交
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
cd ..
```

### Deployment

For GPU deployment

```
CUDA_VISIBLE_DEVICES=0 python deploy.py
```

For CPU deployment

```
python deploy.py --use_gpu=False
```

More help for arguments

```
python deploy.py --help
```