Skip to content

Commit

Permalink
update server readme
Browse files Browse the repository at this point in the history
  • Loading branch information
erogol committed Jan 21, 2021
1 parent 8cfed63 commit 6b6e989
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 2 additions & 3 deletions TTS/bin/synthesize.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def tts(model,
model_config.enable_eos_bos_chars,
use_gl,
speaker_embedding=speaker_embedding)

# grab spectrogram (thx to the nice guys at mozilla discourse for codesnippet)
if args.save_spectogram:
spec_file_name = args.text.replace(" ", "_")[0:10]
Expand Down Expand Up @@ -157,7 +156,7 @@ def tts(model,
'''You can either use your trained model or choose a model from the provided list.\n'''

'''
Example runs:
Example runs:
# list provided models
./TTS/bin/synthesize.py --list_models
Expand All @@ -172,7 +171,7 @@ def tts(model,
./TTS/bin/synthesize.py --text "Text for TTS" --model_path path/to/config.json --config_path path/to/model.pth.tar --out_path output/path/speech.wav
--vocoder_path path/to/vocoder.pth.tar --vocoder_config_path path/to/vocoder_config.json
''',
''',
formatter_class=RawTextHelpFormatter)

parser.add_argument(
Expand Down
16 changes: 16 additions & 0 deletions TTS/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ Instructions below are based on a Ubuntu 18.04 machine, but it should be simple
##### Using 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
1. apt-get install -y espeak libsndfile1 python3-venv
2. python3 -m venv /tmp/venv
Expand All @@ -21,6 +35,8 @@ You can now open http://localhost:5002 in a browser

#### 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
2. python3 -m venv /tmp/venv
3. source /tmp/venv/bin/activate
Expand Down

0 comments on commit 6b6e989

Please sign in to comment.