update server readme

This commit is contained in:
Eren Gölge 2021-01-21 15:29:46 +01:00
parent 8cfed63398
commit 6b6e989fd2
2 changed files with 18 additions and 3 deletions

View File

@ -106,7 +106,6 @@ def tts(model,
model_config.enable_eos_bos_chars, model_config.enable_eos_bos_chars,
use_gl, use_gl,
speaker_embedding=speaker_embedding) speaker_embedding=speaker_embedding)
# grab spectrogram (thx to the nice guys at mozilla discourse for codesnippet) # grab spectrogram (thx to the nice guys at mozilla discourse for codesnippet)
if args.save_spectogram: if args.save_spectogram:
spec_file_name = args.text.replace(" ", "_")[0:10] spec_file_name = args.text.replace(" ", "_")[0:10]

View File

@ -9,6 +9,20 @@ Instructions below are based on a Ubuntu 18.04 machine, but it should be simple
##### Using server.py ##### Using server.py
If you have the environment set already for TTS, then you can directly call ```server.py```. If you have the environment set already for TTS, then you can directly call ```server.py```.
Examples runs:
List officially released models.
```python TTS/server/server.py --list_models ```
Run the server with the official models.
```python TTS/server/server.py --model_name tts_models/en/ljspeech/tacotron2-DCA --vocoder_name vocoder_models/en/ljspeech/mulitband-melgan```
Run the server with the official models on a GPU.
```CUDA_VISIBLE_DEVICES="0" python TTS/server/server.py --model_name tts_models/en/ljspeech/tacotron2-DCA --vocoder_name vocoder_models/en/ljspeech/mulitband-melgan --use_cuda True```
Run the server with a custom models.
```python TTS/server/server.py --tts_checkpoint /path/to/tts/model.pth.tar --tts_config /path/to/tts/config.json --vocoder_checkpoint /path/to/vocoder/model.pth.tar --vocoder_config /path/to/vocoder/config.json```
##### Using .whl ##### Using .whl
1. apt-get install -y espeak libsndfile1 python3-venv 1. apt-get install -y espeak libsndfile1 python3-venv
2. python3 -m venv /tmp/venv 2. python3 -m venv /tmp/venv
@ -21,6 +35,8 @@ You can now open http://localhost:5002 in a browser
#### Running with nginx/uwsgi: #### Running with nginx/uwsgi:
**Note:** This method uses an old TTS model, so quality might be low.
1. apt-get install -y uwsgi uwsgi-plugin-python3 nginx espeak libsndfile1 python3-venv 1. apt-get install -y uwsgi uwsgi-plugin-python3 nginx espeak libsndfile1 python3-venv
2. python3 -m venv /tmp/venv 2. python3 -m venv /tmp/venv
3. source /tmp/venv/bin/activate 3. source /tmp/venv/bin/activate