Spaces:
Runtime error
Runtime error
[bug] 修复了日语语音生成的bug
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def vits(text, language, speaker_id, noise_scale, noise_scale_w, length_scale):
|
|
49 |
return None
|
50 |
if language == "中文":
|
51 |
text = f"[ZH]{text}[ZH]"
|
52 |
-
elif language == "
|
53 |
text = f"[JA]{text}[JA]"
|
54 |
else:
|
55 |
text = f"{text}"
|
@@ -94,7 +94,7 @@ if __name__ == "__main__":
|
|
94 |
fn=vits,
|
95 |
inputs=[
|
96 |
gr.Textbox(label="Text (200 words limitation)", lines=5, value="可莉不知道哦!", elem_id=f"input-text"),
|
97 |
-
gr.Radio(label="language", choices=["中文", "日语", "
|
98 |
gr.Dropdown(label="Speaker", choices=speakers, type="index", value=speakers[329]),
|
99 |
gr.Slider(label="noise_scale (控制感情变化程度)", minimum=0.1, maximum=1.0, step=0.1, value=0.1, interactive=True),
|
100 |
gr.Slider(label="noise_scale_w (控制音素发音长度)", minimum=0.1, maximum=1.0, step=0.1, value=0.7, interactive=True),
|
@@ -105,6 +105,8 @@ if __name__ == "__main__":
|
|
105 |
["可莉不知道哦!", "中文", speakers[329], 0.1, 0.6, 1.2],
|
106 |
["该做什么好呢?", "中文", speakers[104], 0.1, 0.8, 1.2],
|
107 |
["我给你讲个故事吧!", "中文", speakers[122], 0.1, 0.8, 1.2],
|
|
|
|
|
108 |
],
|
109 |
title="VITS Genshin",
|
110 |
description="",
|
|
|
49 |
return None
|
50 |
if language == "中文":
|
51 |
text = f"[ZH]{text}[ZH]"
|
52 |
+
elif language == "日语":
|
53 |
text = f"[JA]{text}[JA]"
|
54 |
else:
|
55 |
text = f"{text}"
|
|
|
94 |
fn=vits,
|
95 |
inputs=[
|
96 |
gr.Textbox(label="Text (200 words limitation)", lines=5, value="可莉不知道哦!", elem_id=f"input-text"),
|
97 |
+
gr.Radio(label="language", choices=["中文", "日语", "中日混合(格式参考下面的example)"], value="中文"),
|
98 |
gr.Dropdown(label="Speaker", choices=speakers, type="index", value=speakers[329]),
|
99 |
gr.Slider(label="noise_scale (控制感情变化程度)", minimum=0.1, maximum=1.0, step=0.1, value=0.1, interactive=True),
|
100 |
gr.Slider(label="noise_scale_w (控制音素发音长度)", minimum=0.1, maximum=1.0, step=0.1, value=0.7, interactive=True),
|
|
|
105 |
["可莉不知道哦!", "中文", speakers[329], 0.1, 0.6, 1.2],
|
106 |
["该做什么好呢?", "中文", speakers[104], 0.1, 0.8, 1.2],
|
107 |
["我给你讲个故事吧!", "中文", speakers[122], 0.1, 0.8, 1.2],
|
108 |
+
["おはようございます~", "日语", speakers[335], 0.1, 0.6, 1.2],
|
109 |
+
["[ZH]我会用日语说早上好啦![ZH][JA]おはようございます~[JA]", "中日混合", speakers[317], 0.1, 0.6, 1.2],
|
110 |
],
|
111 |
title="VITS Genshin",
|
112 |
description="",
|