Spaces:
Running
Running
fx Textbox update
Browse files
app.py
CHANGED
|
@@ -464,13 +464,6 @@ def other_tts(text='Hallov worlds Far over the',
|
|
| 464 |
return tmp_file
|
| 465 |
|
| 466 |
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
def update_selected_voice(voice_filename, text_input_obj):
|
| 470 |
-
_full = 'wav/' + voice_filename + '.wav'
|
| 471 |
-
return _full, gr.Textbox.update(label=f"Text for TTS: Vox={voice_filename}")
|
| 472 |
-
|
| 473 |
-
|
| 474 |
description = (
|
| 475 |
"Estimate **age**, **gender**, and **expression** "
|
| 476 |
"of the speaker contained in an audio file or microphone recording. \n"
|
|
@@ -480,7 +473,11 @@ description = (
|
|
| 480 |
f"whereas [{expression_model_name}]"
|
| 481 |
f"(https://huggingface.co/{expression_model_name}) "
|
| 482 |
"recognises the expression dimensions arousal, dominance, and valence. "
|
| 483 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 484 |
|
| 485 |
css_buttons = """
|
| 486 |
.cool-button {
|
|
@@ -510,8 +507,8 @@ with gr.Blocks(theme='huggingface', css=css_buttons) as demo:
|
|
| 510 |
initial_voice = 'en_US_m-ailabs_mary_ann.wav'
|
| 511 |
selected_voice = gr.State(value=initial_voice)
|
| 512 |
with gr.Row():
|
| 513 |
-
text_input = gr.Textbox(label=f"Text for TTS: Vox
|
| 514 |
-
placeholder="
|
| 515 |
lines=4,
|
| 516 |
value="Farover the misty mountains cold too dungeons deep and caverns old.")
|
| 517 |
generate_button = gr.Button("Generate Audio",
|
|
|
|
| 464 |
return tmp_file
|
| 465 |
|
| 466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 467 |
description = (
|
| 468 |
"Estimate **age**, **gender**, and **expression** "
|
| 469 |
"of the speaker contained in an audio file or microphone recording. \n"
|
|
|
|
| 473 |
f"whereas [{expression_model_name}]"
|
| 474 |
f"(https://huggingface.co/{expression_model_name}) "
|
| 475 |
"recognises the expression dimensions arousal, dominance, and valence. "
|
| 476 |
+
)
|
| 477 |
+
|
| 478 |
+
def update_selected_voice(voice_filename, current_text):
|
| 479 |
+
_full = 'wav/' + voice_filename + '.wav'
|
| 480 |
+
return _full, gr.Textbox.update(label=f"Text for TTS: Vox=`{voice_filename}`", value=current_text)
|
| 481 |
|
| 482 |
css_buttons = """
|
| 483 |
.cool-button {
|
|
|
|
| 507 |
initial_voice = 'en_US_m-ailabs_mary_ann.wav'
|
| 508 |
selected_voice = gr.State(value=initial_voice)
|
| 509 |
with gr.Row():
|
| 510 |
+
text_input = gr.Textbox(label=f"Text for TTS: Vox=`{initial_voice}`",
|
| 511 |
+
placeholder="Enter Text for TTS:",
|
| 512 |
lines=4,
|
| 513 |
value="Farover the misty mountains cold too dungeons deep and caverns old.")
|
| 514 |
generate_button = gr.Button("Generate Audio",
|