Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -220,18 +220,13 @@ if __name__ == "__main__":
|
|
| 220 |
# select character
|
| 221 |
char_dropdown = gr.Dropdown(choices=speakers, value=speakers[0], label='character')
|
| 222 |
language_dropdown = gr.Dropdown(choices=lang, value=lang[0], label='language')
|
| 223 |
-
duration_slider = gr.Slider(minimum=0.1, maximum=5, value=1, step=0.1, label='
|
| 224 |
with gr.Column():
|
| 225 |
text_output = gr.Textbox(label="Message")
|
| 226 |
audio_output = gr.Audio(label="Output Audio", elem_id="tts-audio")
|
| 227 |
btn = gr.Button("Generate!")
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
btn.click(tts_fn, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, symbol_input],
|
| 231 |
-
outputs=[text_output, audio_output])
|
| 232 |
-
else:
|
| 233 |
-
btn.click(tts_fn, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, symbol_input],
|
| 234 |
-
outputs=[text_output, audio_output])
|
| 235 |
gr.Examples(
|
| 236 |
examples=example,
|
| 237 |
inputs=[textbox, char_dropdown, language_dropdown,
|
|
|
|
| 220 |
# select character
|
| 221 |
char_dropdown = gr.Dropdown(choices=speakers, value=speakers[0], label='character')
|
| 222 |
language_dropdown = gr.Dropdown(choices=lang, value=lang[0], label='language')
|
| 223 |
+
duration_slider = gr.Slider(minimum=0.1, maximum=5, value=1, step=0.1, label='速度 Speed')
|
| 224 |
with gr.Column():
|
| 225 |
text_output = gr.Textbox(label="Message")
|
| 226 |
audio_output = gr.Audio(label="Output Audio", elem_id="tts-audio")
|
| 227 |
btn = gr.Button("Generate!")
|
| 228 |
+
btn.click(tts_fn, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, symbol_input],
|
| 229 |
+
outputs=[text_output, audio_output])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
gr.Examples(
|
| 231 |
examples=example,
|
| 232 |
inputs=[textbox, char_dropdown, language_dropdown,
|