Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,28 +57,33 @@ with gr.Blocks() as demo:
|
|
| 57 |
text_input_standard = gr.Textbox(label="Enter text")
|
| 58 |
lang_input_standard = gr.Dropdown(choices=list(LANGUAGES.keys()), label="Language")
|
| 59 |
speaker_input_standard = gr.Audio(label="Upload or Record Speaker Audio (optional)", sources=["upload", "microphone"], type="filepath")
|
|
|
|
|
|
|
| 60 |
generate_button_standard = gr.Button("Generate Speech")
|
| 61 |
output_audio_standard = gr.Audio(label="π¬οΈπ¬πWhisperSpeech")
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
with gr.TabItem("π¬οΈπ¬πMixed Language TTS"):
|
| 70 |
with gr.Row():
|
| 71 |
-
|
|
|
|
|
|
|
| 72 |
mix_lang_input_mixed = gr.CheckboxGroup(choices=list(LANGUAGES.keys()), label="Select Languages")
|
|
|
|
| 73 |
generate_button_mixed = gr.Button("Generate Mixed Speech")
|
| 74 |
output_audio_mixed = gr.Audio(label="Mixedπ¬οΈπ¬πWhisperSpeech")
|
| 75 |
|
| 76 |
generate_button_mixed.click(
|
| 77 |
whisper_speech_demo,
|
| 78 |
-
inputs=[
|
| 79 |
outputs=output_audio_mixed
|
| 80 |
)
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
demo.launch()
|
|
|
|
| 57 |
text_input_standard = gr.Textbox(label="Enter text")
|
| 58 |
lang_input_standard = gr.Dropdown(choices=list(LANGUAGES.keys()), label="Language")
|
| 59 |
speaker_input_standard = gr.Audio(label="Upload or Record Speaker Audio (optional)", sources=["upload", "microphone"], type="filepath")
|
| 60 |
+
placeholder_mix_lang = gr.Textbox(visible=False) # Placeholder, hidden
|
| 61 |
+
placeholder_mix_text = gr.Textbox(visible=False) # Placeholder, hidden
|
| 62 |
generate_button_standard = gr.Button("Generate Speech")
|
| 63 |
output_audio_standard = gr.Audio(label="π¬οΈπ¬πWhisperSpeech")
|
| 64 |
|
| 65 |
+
generate_button_standard.click(
|
| 66 |
+
whisper_speech_demo,
|
| 67 |
+
inputs=[text_input_standard, lang_input_standard, speaker_input_standard, placeholder_mix_lang, placeholder_mix_text],
|
| 68 |
+
outputs=output_audio_standard
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
with gr.TabItem("π¬οΈπ¬πMixed Language TTS"):
|
| 72 |
with gr.Row():
|
| 73 |
+
placeholder_text_input = gr.Textbox(visible=False) # Placeholder, hidden
|
| 74 |
+
placeholder_lang_input = gr.Dropdown(choices=[], visible=False) # Placeholder, hidden
|
| 75 |
+
placeholder_speaker_input = gr.Audio(visible=False)
|
| 76 |
mix_lang_input_mixed = gr.CheckboxGroup(choices=list(LANGUAGES.keys()), label="Select Languages")
|
| 77 |
+
mix_text_input_mixed = gr.Textbox(label="Enter mixed language text", placeholder="e.g., Hello, CzeΕΔ")
|
| 78 |
generate_button_mixed = gr.Button("Generate Mixed Speech")
|
| 79 |
output_audio_mixed = gr.Audio(label="Mixedπ¬οΈπ¬πWhisperSpeech")
|
| 80 |
|
| 81 |
generate_button_mixed.click(
|
| 82 |
whisper_speech_demo,
|
| 83 |
+
inputs=[placeholder_text_input, placeholder_lang_input, placeholder_speaker_input, mix_lang_input_mixed, mix_text_input_mixed],
|
| 84 |
outputs=output_audio_mixed
|
| 85 |
)
|
| 86 |
|
| 87 |
+
demo.launch()
|
| 88 |
|
| 89 |
demo.launch()
|