From 6b6e989fd2d11df5644d86141e558bb44b06e61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Thu, 21 Jan 2021 15:29:46 +0100 Subject: [PATCH] update server readme --- TTS/bin/synthesize.py | 5 ++--- TTS/server/README.md | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/TTS/bin/synthesize.py b/TTS/bin/synthesize.py index c0da695..a4d7032 100755 --- a/TTS/bin/synthesize.py +++ b/TTS/bin/synthesize.py @@ -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] @@ -157,7 +156,7 @@ if __name__ == "__main__": '''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 @@ -172,7 +171,7 @@ Example runs: ./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( diff --git a/TTS/server/README.md b/TTS/server/README.md index 3c65c96..cd88583 100644 --- a/TTS/server/README.md +++ b/TTS/server/README.md @@ -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 @@ -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