Spaces:
Sleeping
Sleeping
Mahiruoshi
commited on
Commit
•
ccbc190
1
Parent(s):
4076968
Update app.py
Browse files
app.py
CHANGED
@@ -341,7 +341,7 @@ def audiobook(inputFile, groupsize, speaker, sdp_ratio, noise_scale, noise_scale
|
|
341 |
if __name__ == "__main__":
|
342 |
parser = argparse.ArgumentParser()
|
343 |
parser.add_argument(
|
344 |
-
"-m", "--model", default="./logs/Bangdream/
|
345 |
)
|
346 |
parser.add_argument(
|
347 |
"-c",
|
@@ -404,16 +404,18 @@ if __name__ == "__main__":
|
|
404 |
f'<img style="width:auto;height:400px;" src="file/image/{name}.png">'
|
405 |
'</div>'
|
406 |
)
|
407 |
-
|
|
|
|
|
408 |
with gr.Column():
|
409 |
text = gr.TextArea(
|
410 |
label="输入纯日语或者中文",
|
411 |
placeholder="输入纯日语或者中文",
|
412 |
-
value="
|
413 |
)
|
414 |
btn = gr.Button("点击生成", variant="primary")
|
415 |
audio_output = gr.Audio(label="Output Audio")
|
416 |
-
with gr.Accordion(label="
|
417 |
sdp_ratio = gr.Slider(
|
418 |
minimum=0, maximum=1, value=0.2, step=0.01, label="SDP/DP混合比"
|
419 |
)
|
@@ -423,9 +425,7 @@ if __name__ == "__main__":
|
|
423 |
noise_scale_w = gr.Slider(
|
424 |
minimum=0.1, maximum=2, value=0.8, step=0.01, label="音素长度"
|
425 |
)
|
426 |
-
|
427 |
-
minimum=0.1, maximum=2, value=1, step=0.01, label="生成长度"
|
428 |
-
)
|
429 |
speaker = gr.Dropdown(
|
430 |
choices=speakers, value=name, label="说话人"
|
431 |
)
|
@@ -462,7 +462,7 @@ if __name__ == "__main__":
|
|
462 |
value = i[3],
|
463 |
)
|
464 |
speaker = gr.Dropdown(
|
465 |
-
choices=speakers, value = i[2], label="
|
466 |
)
|
467 |
with gr.Column():
|
468 |
sdp_ratio = gr.Slider(
|
|
|
341 |
if __name__ == "__main__":
|
342 |
parser = argparse.ArgumentParser()
|
343 |
parser.add_argument(
|
344 |
+
"-m", "--model", default="./logs/Bangdream/G_28000.pth", help="path of your model"
|
345 |
)
|
346 |
parser.add_argument(
|
347 |
"-c",
|
|
|
404 |
f'<img style="width:auto;height:400px;" src="file/image/{name}.png">'
|
405 |
'</div>'
|
406 |
)
|
407 |
+
length_scale = gr.Slider(
|
408 |
+
minimum=0.1, maximum=2, value=1, step=0.01, label="语速调节"
|
409 |
+
)
|
410 |
with gr.Column():
|
411 |
text = gr.TextArea(
|
412 |
label="输入纯日语或者中文",
|
413 |
placeholder="输入纯日语或者中文",
|
414 |
+
value="有个人躺在地上,哀嚎......\n有个人睡着了,睡在盒子里。\n我要把它打开,看看他的梦是什么。",
|
415 |
)
|
416 |
btn = gr.Button("点击生成", variant="primary")
|
417 |
audio_output = gr.Audio(label="Output Audio")
|
418 |
+
with gr.Accordion(label="其它参数设定", open=False):
|
419 |
sdp_ratio = gr.Slider(
|
420 |
minimum=0, maximum=1, value=0.2, step=0.01, label="SDP/DP混合比"
|
421 |
)
|
|
|
425 |
noise_scale_w = gr.Slider(
|
426 |
minimum=0.1, maximum=2, value=0.8, step=0.01, label="音素长度"
|
427 |
)
|
428 |
+
LongSentence = gr.Checkbox(value=True, label="Generate LongSentence")
|
|
|
|
|
429 |
speaker = gr.Dropdown(
|
430 |
choices=speakers, value=name, label="说话人"
|
431 |
)
|
|
|
462 |
value = i[3],
|
463 |
)
|
464 |
speaker = gr.Dropdown(
|
465 |
+
choices=speakers, value = i[2], label="选择默认说话人"
|
466 |
)
|
467 |
with gr.Column():
|
468 |
sdp_ratio = gr.Slider(
|