Spaces:
Running
Running
ydp
#2
by
KSummer
- opened
app.py
CHANGED
@@ -40,7 +40,7 @@ def create_tts_fn(net_g_ms, speaker_id):
|
|
40 |
text = text.replace('\n', ' ').replace('\r', '').replace(" ", "")
|
41 |
if limitation:
|
42 |
text_len = len(re.sub("\[([A-Z]{2})\]", "", text))
|
43 |
-
max_len =
|
44 |
if text_len > max_len:
|
45 |
return "Error: Text is too long", None
|
46 |
if language == 0:
|
@@ -119,9 +119,9 @@ if __name__ == '__main__':
|
|
119 |
gr.Markdown(
|
120 |
"# <center> vits-models\n"
|
121 |
"![visitor badge](https://visitor-badge.glitch.me/badge?page_id=sayashi.vits-models)\n\n"
|
122 |
-
"[
|
123 |
-
"(https://
|
124 |
-
"
|
125 |
"[Finetune your own model](https://github.com/SayaSS/vits-finetuning)"
|
126 |
)
|
127 |
|
@@ -138,7 +138,7 @@ if __name__ == '__main__':
|
|
138 |
)
|
139 |
with gr.Row():
|
140 |
with gr.Column():
|
141 |
-
input_text = gr.Textbox(label="Text (
|
142 |
lang = gr.Dropdown(label="Language", choices=["Chinese", "Japanese", "Mix(wrap the Chinese text with [ZH][ZH], wrap the Japanese text with [JA][JA])"],
|
143 |
type="index", value=language)
|
144 |
btn = gr.Button(value="Generate")
|
@@ -165,7 +165,7 @@ if __name__ == '__main__':
|
|
165 |
)
|
166 |
with gr.Row():
|
167 |
with gr.Column():
|
168 |
-
input_text = gr.Textbox(label="文本 (
|
169 |
lang = gr.Dropdown(label="语言", choices=["中文", "日语", "中日混合(中文用[ZH][ZH]包裹起来,日文用[JA][JA]包裹起来)"],
|
170 |
type="index", value="中文"if language == "Chinese" else "日语")
|
171 |
btn = gr.Button(value="生成")
|
|
|
40 |
text = text.replace('\n', ' ').replace('\r', '').replace(" ", "")
|
41 |
if limitation:
|
42 |
text_len = len(re.sub("\[([A-Z]{2})\]", "", text))
|
43 |
+
max_len = 1000
|
44 |
if text_len > max_len:
|
45 |
return "Error: Text is too long", None
|
46 |
if language == 0:
|
|
|
119 |
gr.Markdown(
|
120 |
"# <center> vits-models\n"
|
121 |
"![visitor badge](https://visitor-badge.glitch.me/badge?page_id=sayashi.vits-models)\n\n"
|
122 |
+
"[个人主页]"
|
123 |
+
"(https://space.bilibili.com/100815575/favlist?fid=1220345775&ftype=create)"
|
124 |
+
" B站.(用户)\n\n"
|
125 |
"[Finetune your own model](https://github.com/SayaSS/vits-finetuning)"
|
126 |
)
|
127 |
|
|
|
138 |
)
|
139 |
with gr.Row():
|
140 |
with gr.Column():
|
141 |
+
input_text = gr.Textbox(label="Text (1000 words limitation)", lines=5, value=example, elem_id=f"input-text-en-{name_en.replace(' ','')}")
|
142 |
lang = gr.Dropdown(label="Language", choices=["Chinese", "Japanese", "Mix(wrap the Chinese text with [ZH][ZH], wrap the Japanese text with [JA][JA])"],
|
143 |
type="index", value=language)
|
144 |
btn = gr.Button(value="Generate")
|
|
|
165 |
)
|
166 |
with gr.Row():
|
167 |
with gr.Column():
|
168 |
+
input_text = gr.Textbox(label="文本 (1000字上限)", lines=5, value=example, elem_id=f"input-text-zh-{name_zh}")
|
169 |
lang = gr.Dropdown(label="语言", choices=["中文", "日语", "中日混合(中文用[ZH][ZH]包裹起来,日文用[JA][JA]包裹起来)"],
|
170 |
type="index", value="中文"if language == "Chinese" else "日语")
|
171 |
btn = gr.Button(value="生成")
|