diff --git a/TTS/server/server.py b/TTS/server/server.py
index bd23ea9c..f2412bb8 100644
--- a/TTS/server/server.py
+++ b/TTS/server/server.py
@@ -4,6 +4,7 @@ import os
from flask import Flask, request, render_template, send_file
from TTS.server.synthesizer import Synthesizer
+from TTS.utils.io import load_config
def create_argparser():
@@ -23,6 +24,7 @@ def create_argparser():
parser.add_argument('--port', type=int, default=5002, help='port to listen on.')
parser.add_argument('--use_cuda', type=convert_boolean, default=False, help='true to use CUDA.')
parser.add_argument('--debug', type=convert_boolean, default=False, help='true to enable Flask debug mode.')
+ parser.add_argument('--show_details', type=convert_boolean, default=False, help='Generate model detail page.')
return parser
@@ -69,6 +71,22 @@ app = Flask(__name__)
def index():
return render_template('index.html')
+@app.route('/details')
+def details():
+ if args.tts_config is not None and os.path.isfile(args.tts_config):
+ taco2_config = load_config(args.tts_config)
+
+ if args.vocoder_config is not None and os.path.isfile(args.vocoder_config):
+ vocoder_config = load_config(args.vocoder_config)
+ else:
+ vocoder_config = None
+
+ return render_template('details.html',
+ show_details=args.show_details
+ , taco2_config=taco2_config
+ , vocoder_config=vocoder_config
+ , args=args.__dict__
+ )
@app.route('/api/tts', methods=['GET'])
def tts():
diff --git a/TTS/server/templates/details.html b/TTS/server/templates/details.html
new file mode 100644
index 00000000..2db60657
--- /dev/null
+++ b/TTS/server/templates/details.html
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+ TTS engine
+
+
+
+
+
+
+
+
+
+
+
+ {% if show_details == true %}
+
+
+ Model details
+
+
+
+
+ CLI arguments:
+
+
+ | CLI key |
+ Value |
+
+
+ {% for key, value in args.items() %}
+
+
+ | {{ key }} |
+ {{ value }} |
+
+
+ {% endfor %}
+
+
+
+
+
+
+ {% if taco2_config != None %}
+
+
+ Tacotron2 model config:
+
+
+
+ | Key |
+ Value |
+
+
+
+ {% for key, value in taco2_config.items() %}
+
+
+ | {{ key }} |
+ {{ value }} |
+
+
+ {% endfor %}
+
+
+
+
+ {% endif %}
+
+
+
+
+
+
+ {% if vocoder_config != None %}
+
+ Vocoder model config:
+
+
+
+ | Key |
+ Value |
+
+
+
+ {% for key, value in vocoder_config.items() %}
+
+
+ | {{ key }} |
+ {{ value }} |
+
+
+ {% endfor %}
+
+
+
+
+ {% endif %}
+
+
+ {% else %}
+
+ Please start server with --show_details=true to see details.
+
+
+ {% endif %}
+
+
+
+
\ No newline at end of file