mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 15:19:59 +08:00
更新了app
This commit is contained in:
parent
8298323655
commit
f5cda5d4d5
@ -1 +1 @@
|
||||
Subproject commit 1b59faa01237c81bde6c2dfa4a0c0491bc50dda5
|
||||
Subproject commit 6e09974b7fd2827f0f1dd30301653f4359950a86
|
7
app.py
7
app.py
@ -24,7 +24,7 @@ if os.path.exists(config_path):
|
||||
locale_language = str(_config.get("locale", "auto"))
|
||||
locale_language = None if locale_language.lower() == "auto" else locale_language
|
||||
tts_port = _config.get("tts_port", 5000)
|
||||
max_text_length = _config.get("max_text_length", 70)
|
||||
max_text_length = _config.get("max_text_length", -1)
|
||||
default_batch_size = _config.get("batch_size", 10)
|
||||
default_word_count = _config.get("max_word_count", 80)
|
||||
is_share = _config.get("is_share", "false").lower() == "true"
|
||||
@ -108,7 +108,7 @@ def send_request(
|
||||
|
||||
|
||||
params = {
|
||||
"text": text,
|
||||
"text": text.replace("…","。").replace("。\n","\n").replace("\n", "。\n"),
|
||||
"text_language": text_language,
|
||||
|
||||
"top_k": top_k,
|
||||
@ -279,8 +279,9 @@ except:
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown(information)
|
||||
with gr.Row():
|
||||
max_text_length_tip = "" if max_text_length == -1 else f"( "+i18n("最大允许长度")+ f" : {max_text_length} ) "
|
||||
text = gr.Textbox(
|
||||
value=default_text, label=i18n("输入文本")+"( "+ i18n("最大允许长度") + f": {max_text_length} )", interactive=True, lines=8
|
||||
value=default_text, label=i18n("输入文本")+max_text_length_tip, interactive=True, lines=8
|
||||
)
|
||||
text.blur(lambda x: gr.update(value=cut_sentence_multilang(x,max_length=max_text_length)[0]), [text], [text])
|
||||
with gr.Row():
|
||||
|
Loading…
x
Reference in New Issue
Block a user