Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
|
@@ -491,10 +491,16 @@ def vote(btn):
|
|
| 491 |
print(btn)
|
| 492 |
gr.Info('Thanks for the feedback!')
|
| 493 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 494 |
with gr.Blocks() as preview_tts:
|
| 495 |
with gr.Row():
|
| 496 |
gr.Markdown('''
|
| 497 |
-
🧪 Experimental: v0.22x
|
| 498 |
|
| 499 |
☝️ Check out v0.19 and multilingual v0.22 for a lot more voices, languages, and features!
|
| 500 |
|
|
@@ -503,7 +509,7 @@ with gr.Blocks() as preview_tts:
|
|
| 503 |
with gr.Row():
|
| 504 |
with gr.Column():
|
| 505 |
text = gr.Textbox(label='Input Text', info='Generate speech for one segment of text, up to ~500 characters')
|
| 506 |
-
voice = gr.Dropdown(
|
| 507 |
with gr.Row():
|
| 508 |
random_btn = gr.Button('Random Text', variant='secondary')
|
| 509 |
generate_btn = gr.Button('Generate', variant='primary')
|
|
@@ -517,10 +523,18 @@ with gr.Blocks() as preview_tts:
|
|
| 517 |
trim = gr.Slider(minimum=0, maximum=1, value=0.5, step=0.1, label='✂️ Trim', info='How much to cut from both ends')
|
| 518 |
with gr.Row():
|
| 519 |
with gr.Accordion('Feedback', open=True):
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 524 |
with gr.Row():
|
| 525 |
sk = gr.Textbox(visible=False)
|
| 526 |
text.change(lambda: os.environ['SK'], outputs=[sk])
|
|
|
|
| 491 |
print(btn)
|
| 492 |
gr.Info('Thanks for the feedback!')
|
| 493 |
|
| 494 |
+
PREVIEW_CHOICES = {
|
| 495 |
+
'🇺🇸 🚺 Heart ❤️': 'af_heart',
|
| 496 |
+
'🇺🇸 🚺 Spirit 🦋': 'af_spirit',
|
| 497 |
+
'🇬🇧 🚺 Soul 🪽': 'bf_soul',
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
with gr.Blocks() as preview_tts:
|
| 501 |
with gr.Row():
|
| 502 |
gr.Markdown('''
|
| 503 |
+
🧪 Experimental: v0.22x previews a potential change to the default English voice. 🧪
|
| 504 |
|
| 505 |
☝️ Check out v0.19 and multilingual v0.22 for a lot more voices, languages, and features!
|
| 506 |
|
|
|
|
| 509 |
with gr.Row():
|
| 510 |
with gr.Column():
|
| 511 |
text = gr.Textbox(label='Input Text', info='Generate speech for one segment of text, up to ~500 characters')
|
| 512 |
+
voice = gr.Dropdown(list(PREVIEW_CHOICES.items()), value='af_heart', label='Voice', info='🧪 These voices are experimental')
|
| 513 |
with gr.Row():
|
| 514 |
random_btn = gr.Button('Random Text', variant='secondary')
|
| 515 |
generate_btn = gr.Button('Generate', variant='primary')
|
|
|
|
| 523 |
trim = gr.Slider(minimum=0, maximum=1, value=0.5, step=0.1, label='✂️ Trim', info='How much to cut from both ends')
|
| 524 |
with gr.Row():
|
| 525 |
with gr.Accordion('Feedback', open=True):
|
| 526 |
+
with gr.Row():
|
| 527 |
+
gr.Markdown('Vote for the voice you like the best among 3 challengers and 1 defender.')
|
| 528 |
+
with gr.Row():
|
| 529 |
+
heart_btn = gr.Button('🇺🇸 🚺 Heart ❤️', variant='secondary')
|
| 530 |
+
heart_btn.click(vote, inputs=[heart_btn])
|
| 531 |
+
soul_btn = gr.Button('🇺🇸 🚺 Spirit 🦋', variant='secondary')
|
| 532 |
+
soul_btn.click(vote, inputs=[soul_btn])
|
| 533 |
+
with gr.Row():
|
| 534 |
+
spirit_btn = gr.Button('🇬🇧 🚺 Soul 🪽', variant='secondary')
|
| 535 |
+
spirit_btn.click(vote, inputs=[spirit_btn])
|
| 536 |
+
old_btn = gr.Button('🇺🇸 🚺 American Female ⭐', variant='secondary')
|
| 537 |
+
old_btn.click(vote, inputs=[old_btn])
|
| 538 |
with gr.Row():
|
| 539 |
sk = gr.Textbox(visible=False)
|
| 540 |
text.change(lambda: os.environ['SK'], outputs=[sk])
|