Commit
•
5a2b8b8
1
Parent(s):
deba8ab
Update app.py
Browse files
app.py
CHANGED
@@ -110,15 +110,25 @@ if __name__ == "__main__":
|
|
110 |
speaker_ids = hps.data.spk2id
|
111 |
speakers = list(speaker_ids.keys())
|
112 |
with gr.Blocks() as app:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
with gr.Row():
|
114 |
with gr.Column():
|
115 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
116 |
value="那是流萤吗,是明灭迷离,天真绮丽的憧憬。那是尘埃吧,是虚无纷飞,终将落地的谎言。")
|
117 |
speaker = gr.Dropdown(choices=speakers, value=speakers[0], label='Speaker')
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
122 |
btn = gr.Button("开启AI语音之旅吧!", variant="primary")
|
123 |
with gr.Column():
|
124 |
text_output = gr.Textbox(label="Message")
|
@@ -127,8 +137,5 @@ if __name__ == "__main__":
|
|
127 |
btn.click(tts_fn,
|
128 |
inputs=[text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale],
|
129 |
outputs=[text_output, audio_output])
|
130 |
-
|
131 |
-
# webbrowser.open("http://127.0.0.1:6006")
|
132 |
-
# app.launch(server_port=6006, show_error=True)
|
133 |
-
|
134 |
app.launch(show_error=True)
|
|
|
110 |
speaker_ids = hps.data.spk2id
|
111 |
speakers = list(speaker_ids.keys())
|
112 |
with gr.Blocks() as app:
|
113 |
+
gr.Markdown("# <center>🌊💕🎶 - Bert-VITS2 语音合成</center>")
|
114 |
+
gr.Markdown("## <center>🌟 - 真实拟声、情感细腻:稻妻神里流太刀术皆传,神里绫华,参上! </center>")
|
115 |
+
gr.Markdown("### <center>🍻 - 更多精彩应用,尽在[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
|
116 |
+
with gr.Accordion(open=True):
|
117 |
+
gr.Markdown("<h1 align="center"><a href="https://picx.zhimg.com/70/v2-3441a1785b6d2a2a985eefc9215fc655_1440w.avis?source=172ae18b&biz_tag=Post", alt="talktalkai" border="0" style="margin: 0 auto; height: 200px;" /></a> </h1>")
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
with gr.Row():
|
122 |
with gr.Column():
|
123 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
124 |
value="那是流萤吗,是明灭迷离,天真绮丽的憧憬。那是尘埃吧,是虚无纷飞,终将落地的谎言。")
|
125 |
speaker = gr.Dropdown(choices=speakers, value=speakers[0], label='Speaker')
|
126 |
+
with gr.Row():
|
127 |
+
sdp_ratio = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.1, label='语调变化')
|
128 |
+
noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.6, step=0.1, label='感情变化')
|
129 |
+
with gr,Row():
|
130 |
+
noise_scale_w = gr.Slider(minimum=0.1, maximum=1.4, value=0.8, step=0.1, label='音节发音长度变化')
|
131 |
+
length_scale = gr.Slider(minimum=0.1, maximum=2, value=1, step=0.1, label='语速 (数值越小,语速越快)')
|
132 |
btn = gr.Button("开启AI语音之旅吧!", variant="primary")
|
133 |
with gr.Column():
|
134 |
text_output = gr.Textbox(label="Message")
|
|
|
137 |
btn.click(tts_fn,
|
138 |
inputs=[text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale],
|
139 |
outputs=[text_output, audio_output])
|
140 |
+
|
|
|
|
|
|
|
141 |
app.launch(show_error=True)
|