Spaces:
Runtime error
Runtime error
Commit
·
d539577
1
Parent(s):
d420350
Rename webui.py to app.py
Browse files- webui.py → app.py +16 -11
webui.py → app.py
RENAMED
@@ -1,4 +1,3 @@
|
|
1 |
-
# flake8: noqa: E402
|
2 |
import re
|
3 |
import sys, os
|
4 |
import logging
|
@@ -150,7 +149,7 @@ def tts_fn(text: str, speaker, sdp_ratio, noise_scale, noise_scale_w, length_sca
|
|
150 |
if __name__ == "__main__":
|
151 |
parser = argparse.ArgumentParser()
|
152 |
parser.add_argument(
|
153 |
-
"-m", "--model", default="./logs/
|
154 |
)
|
155 |
parser.add_argument(
|
156 |
"-c",
|
@@ -197,6 +196,15 @@ if __name__ == "__main__":
|
|
197 |
with gr.Blocks() as app:
|
198 |
with gr.Row():
|
199 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
text = gr.TextArea(
|
201 |
label="输入文本内容",
|
202 |
placeholder="""
|
@@ -225,17 +233,13 @@ if __name__ == "__main__":
|
|
225 |
minimum=0.1, maximum=2, value=0.8, step=0.1, label="语速"
|
226 |
)
|
227 |
language = gr.Dropdown(
|
228 |
-
choices=languages, value=languages[0], label="选择语言(
|
229 |
)
|
230 |
btn = gr.Button("生成音频!", variant="primary")
|
231 |
with gr.Column():
|
232 |
text_output = gr.Textbox(label="状态信息")
|
233 |
audio_output = gr.Audio(label="输出音频")
|
234 |
-
|
235 |
-
show_label=True,
|
236 |
-
show_share_button=False,
|
237 |
-
show_download_button=False,
|
238 |
-
value=os.path.abspath("./img/参数说明.png"))
|
239 |
btn.click(
|
240 |
tts_fn,
|
241 |
inputs=[
|
@@ -250,6 +254,7 @@ if __name__ == "__main__":
|
|
250 |
outputs=[text_output, audio_output],
|
251 |
)
|
252 |
|
253 |
-
|
254 |
-
|
255 |
-
|
|
|
|
|
|
1 |
import re
|
2 |
import sys, os
|
3 |
import logging
|
|
|
149 |
if __name__ == "__main__":
|
150 |
parser = argparse.ArgumentParser()
|
151 |
parser.add_argument(
|
152 |
+
"-m", "--model", default="./logs/baicai/G_12000.pth", help="path of your model"
|
153 |
)
|
154 |
parser.add_argument(
|
155 |
"-c",
|
|
|
196 |
with gr.Blocks() as app:
|
197 |
with gr.Row():
|
198 |
with gr.Column():
|
199 |
+
gr.Markdown(value="""
|
200 |
+
bert-vits-v1.1.1整合包作者:@spicysama\n
|
201 |
+
整合包b站链接:https://www.bilibili.com/video/BV1hu4y1W7dW\n
|
202 |
+
模型作者:RUSHB-喵咪\n
|
203 |
+
声音归属:@眞白花音_Official\n
|
204 |
+
Bert-VITS2项目:https://github.com/Stardust-minus/Bert-VITS2\n
|
205 |
+
白菜的B站账号:https://space.bilibili.com/401480763\n
|
206 |
+
发布二创作品请标注本项目作者及链接、作品使用Bert-VITS2 AI生成!\n
|
207 |
+
""")
|
208 |
text = gr.TextArea(
|
209 |
label="输入文本内容",
|
210 |
placeholder="""
|
|
|
233 |
minimum=0.1, maximum=2, value=0.8, step=0.1, label="语速"
|
234 |
)
|
235 |
language = gr.Dropdown(
|
236 |
+
choices=languages, value=languages[0], label="选择语言(该模型mix和中文效果不好,先别用)"
|
237 |
)
|
238 |
btn = gr.Button("生成音频!", variant="primary")
|
239 |
with gr.Column():
|
240 |
text_output = gr.Textbox(label="状态信息")
|
241 |
audio_output = gr.Audio(label="输出音频")
|
242 |
+
|
|
|
|
|
|
|
|
|
243 |
btn.click(
|
244 |
tts_fn,
|
245 |
inputs=[
|
|
|
254 |
outputs=[text_output, audio_output],
|
255 |
)
|
256 |
|
257 |
+
|
258 |
+
|
259 |
+
|
260 |
+
app.launch(show_error=True)
|