Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -167,10 +167,10 @@ with gr.Blocks(title="Multi-Voice Text-to-Speech", theme="soft") as demo:
|
|
| 167 |
with gr.Column():
|
| 168 |
audio_output = gr.Audio(label="Generated Speech", autoplay=True)
|
| 169 |
download_btn = gr.DownloadButton(
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
file_name="speech.mp3"
|
| 173 |
)
|
|
|
|
| 174 |
|
| 175 |
# Interactive components
|
| 176 |
language_filter.change(
|
|
@@ -179,11 +179,12 @@ with gr.Blocks(title="Multi-Voice Text-to-Speech", theme="soft") as demo:
|
|
| 179 |
outputs=voice_dropdown
|
| 180 |
)
|
| 181 |
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
|
|
|
| 187 |
|
| 188 |
audio_output.change(
|
| 189 |
lambda: gr.DownloadButton.update(visible=True),
|
|
|
|
| 167 |
with gr.Column():
|
| 168 |
audio_output = gr.Audio(label="Generated Speech", autoplay=True)
|
| 169 |
download_btn = gr.DownloadButton(
|
| 170 |
+
label="Download Audio",
|
| 171 |
+
visible=False
|
|
|
|
| 172 |
)
|
| 173 |
+
|
| 174 |
|
| 175 |
# Interactive components
|
| 176 |
language_filter.change(
|
|
|
|
| 179 |
outputs=voice_dropdown
|
| 180 |
)
|
| 181 |
|
| 182 |
+
generate_btn.click(
|
| 183 |
+
text_to_speech,
|
| 184 |
+
inputs=[text_input, voice_dropdown],
|
| 185 |
+
outputs=[audio_output, download_btn]
|
| 186 |
+
)
|
| 187 |
+
|
| 188 |
|
| 189 |
audio_output.change(
|
| 190 |
lambda: gr.DownloadButton.update(visible=True),
|