Update gui.py&webui.py (#1216)

1. Fix the issue that gui needs to reload models for each inference
2. Fix the issue that webui would be toggled by relevant import
3. Complement missing package import
4. Simplify GUI's code and address various inefficiencies, including: enabling direct input of ref text and target text (akin to the WebUI), facilitating file selection for ref audio uploads, adding language options for CH-EN/JA-EN/Multi (with Multi as the default), standardizing variable name to enhance readability.
This commit is contained in:
Spr_Aachen
2024-06-21 18:05:16 +08:00
committed by GitHub
parent db50670598
commit d8bcc732d7
2 changed files with 53 additions and 81 deletions

View File

@@ -639,10 +639,12 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
button5.click(cut5, [text_inp], [text_opt])
gr.Markdown(value=i18n("后续将支持转音素、手工修改音素、语音合成分步执行。"))
app.queue(concurrency_count=511, max_size=1022).launch(
server_name="0.0.0.0",
inbrowser=True,
share=is_share,
server_port=infer_ttswebui,
quiet=True,
)
if __name__ == '__main__':
app.queue(concurrency_count=511, max_size=1022).launch(
server_name="0.0.0.0",
inbrowser=True,
share=is_share,
server_port=infer_ttswebui,
quiet=True,
)