AsakuraMizu
commited on
Commit
β’
a045938
1
Parent(s):
de28f74
add api
Browse files
app.py
CHANGED
@@ -240,7 +240,7 @@ if __name__ == '__main__':
|
|
240 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"tts-audio{i}"))
|
241 |
|
242 |
tts_submit.click(tts_fn, [tts_input1, tts_input2, tts_input3, symbol_input],
|
243 |
-
[tts_output1, tts_output2])
|
244 |
symbol_input.change(to_symbol_fn,
|
245 |
[symbol_input, tts_input1, temp_text_var],
|
246 |
[tts_input1, temp_text_var])
|
@@ -283,7 +283,7 @@ if __name__ == '__main__':
|
|
283 |
vc_output2 = gr.Audio(label="Output Audio", elem_id=f"vc-audio{i}")
|
284 |
download = gr.Button("Download Audio")
|
285 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"vc-audio{i}"))
|
286 |
-
vc_submit.click(vc_fn, [vc_input1, vc_input2, vc_input3], [vc_output1, vc_output2])
|
287 |
with gr.TabItem("Soft Voice Conversion"):
|
288 |
with gr.Tabs():
|
289 |
for i, (name, author, cover_path, speakers, soft_vc_fn) in enumerate(models_soft_vc):
|
@@ -309,7 +309,7 @@ if __name__ == '__main__':
|
|
309 |
source_tabs.set_event_trigger("change", None, [], [vc_input2, vc_input3],
|
310 |
js="()=>[null,null]")
|
311 |
vc_submit.click(soft_vc_fn, [vc_input1, vc_input2, vc_input3],
|
312 |
-
[vc_output1, vc_output2])
|
313 |
gr.Markdown(
|
314 |
"unofficial demo for \n\n"
|
315 |
"- [https://github.com/CjangCjengh/MoeGoe](https://github.com/CjangCjengh/MoeGoe)\n"
|
@@ -317,4 +317,4 @@ if __name__ == '__main__':
|
|
317 |
"- [https://github.com/luoyily/MoeTTS](https://github.com/luoyily/MoeTTS)\n"
|
318 |
"- [https://github.com/Francis-Komizu/Sovits](https://github.com/Francis-Komizu/Sovits)"
|
319 |
)
|
320 |
-
app.queue(concurrency_count=3).launch(
|
|
|
240 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"tts-audio{i}"))
|
241 |
|
242 |
tts_submit.click(tts_fn, [tts_input1, tts_input2, tts_input3, symbol_input],
|
243 |
+
[tts_output1, tts_output2], api_name=f"tts-model{i}")
|
244 |
symbol_input.change(to_symbol_fn,
|
245 |
[symbol_input, tts_input1, temp_text_var],
|
246 |
[tts_input1, temp_text_var])
|
|
|
283 |
vc_output2 = gr.Audio(label="Output Audio", elem_id=f"vc-audio{i}")
|
284 |
download = gr.Button("Download Audio")
|
285 |
download.click(None, [], [], _js=download_audio_js.format(audio_id=f"vc-audio{i}"))
|
286 |
+
vc_submit.click(vc_fn, [vc_input1, vc_input2, vc_input3], [vc_output1, vc_output2], api_name=f"vc-model{i}")
|
287 |
with gr.TabItem("Soft Voice Conversion"):
|
288 |
with gr.Tabs():
|
289 |
for i, (name, author, cover_path, speakers, soft_vc_fn) in enumerate(models_soft_vc):
|
|
|
309 |
source_tabs.set_event_trigger("change", None, [], [vc_input2, vc_input3],
|
310 |
js="()=>[null,null]")
|
311 |
vc_submit.click(soft_vc_fn, [vc_input1, vc_input2, vc_input3],
|
312 |
+
[vc_output1, vc_output2], api_name=f"svc-model{i}")
|
313 |
gr.Markdown(
|
314 |
"unofficial demo for \n\n"
|
315 |
"- [https://github.com/CjangCjengh/MoeGoe](https://github.com/CjangCjengh/MoeGoe)\n"
|
|
|
317 |
"- [https://github.com/luoyily/MoeTTS](https://github.com/luoyily/MoeTTS)\n"
|
318 |
"- [https://github.com/Francis-Komizu/Sovits](https://github.com/Francis-Komizu/Sovits)"
|
319 |
)
|
320 |
+
app.queue(concurrency_count=3).launch(share=args.share)
|