Spaces:
Runtime error
Runtime error
Digital Xingtong
commited on
Commit
•
0941347
1
Parent(s):
8ec1d10
Update app.py
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ def tts_fn(text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale):
|
|
88 |
|
89 |
if __name__ == "__main__":
|
90 |
parser = argparse.ArgumentParser()
|
91 |
-
parser.add_argument("--model_dir", default="./logs/
|
92 |
parser.add_argument("--config_dir", default="./configs/config.json", help="path of your config file")
|
93 |
parser.add_argument("--share", default=False, help="make link public")
|
94 |
parser.add_argument("-d", "--debug", action="store_true", help="enable DEBUG-LEVEL log")
|
@@ -142,10 +142,10 @@ if __name__ == "__main__":
|
|
142 |
""")
|
143 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
144 |
value="这里是数字星瞳企画,请在电报搜索星瞳全拼加二五六八零,获取最新更新进展。")
|
145 |
-
speaker = gr.Dropdown(choices=speakers, value=speakers[0], label='Speaker')
|
146 |
-
sdp_ratio = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.
|
147 |
-
noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.6, step=0.
|
148 |
-
noise_scale_w = gr.Slider(minimum=0.1, maximum=1.4, value=0.8, step=0.
|
149 |
length_scale = gr.Slider(minimum=0.1, maximum=2, value=1, step=0.01, label='语速')
|
150 |
btn = gr.Button("开启AI语音之旅吧!", variant="primary")
|
151 |
with gr.Column():
|
@@ -154,10 +154,8 @@ if __name__ == "__main__":
|
|
154 |
ogg_output = gr.File(label="Converted OGG file")
|
155 |
|
156 |
btn.click(tts_fn,
|
157 |
-
inputs=[text,
|
158 |
outputs=[text_output, audio_output,ogg_output])
|
159 |
|
160 |
-
# webbrowser.open("http://127.0.0.1:6006")
|
161 |
-
# app.launch(server_port=6006, show_error=True)
|
162 |
|
163 |
app.launch(show_error=True)
|
|
|
88 |
|
89 |
if __name__ == "__main__":
|
90 |
parser = argparse.ArgumentParser()
|
91 |
+
parser.add_argument("--model_dir", default="./logs/nanami/nanami.pth", help="path of your model")
|
92 |
parser.add_argument("--config_dir", default="./configs/config.json", help="path of your config file")
|
93 |
parser.add_argument("--share", default=False, help="make link public")
|
94 |
parser.add_argument("-d", "--debug", action="store_true", help="enable DEBUG-LEVEL log")
|
|
|
142 |
""")
|
143 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
144 |
value="这里是数字星瞳企画,请在电报搜索星瞳全拼加二五六八零,获取最新更新进展。")
|
145 |
+
# speaker = gr.Dropdown(choices=speakers, value=speakers[0], label='Speaker')
|
146 |
+
sdp_ratio = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.01, label='语调变化')
|
147 |
+
noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.6, step=0.01, label='感情变化')
|
148 |
+
noise_scale_w = gr.Slider(minimum=0.1, maximum=1.4, value=0.8, step=0.01, label='音节发音长度变化')
|
149 |
length_scale = gr.Slider(minimum=0.1, maximum=2, value=1, step=0.01, label='语速')
|
150 |
btn = gr.Button("开启AI语音之旅吧!", variant="primary")
|
151 |
with gr.Column():
|
|
|
154 |
ogg_output = gr.File(label="Converted OGG file")
|
155 |
|
156 |
btn.click(tts_fn,
|
157 |
+
inputs=[text, "ign", sdp_ratio, noise_scale, noise_scale_w, length_scale],
|
158 |
outputs=[text_output, audio_output,ogg_output])
|
159 |
|
|
|
|
|
160 |
|
161 |
app.launch(show_error=True)
|