Spaces:
Running
Running
change to live for audio output
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import wave
|
| 3 |
import numpy as np
|
| 4 |
from io import BytesIO
|
|
@@ -40,7 +40,7 @@ with gr.Blocks(theme=gr.themes.Base()) as blocks:
|
|
| 40 |
gr.Markdown("# Text to Speech Synthesizer")
|
| 41 |
gr.Markdown("Enter text to synthesize it into speech using PiperVoice.")
|
| 42 |
input_text = gr.Textbox(label="Input Text")
|
| 43 |
-
output_audio = gr.Audio(label="Synthesized Speech", type="numpy")
|
| 44 |
output_text = gr.Textbox(label="Output Text", visible=False) # This is the new text output component
|
| 45 |
submit_button = gr.Button("Synthesize")
|
| 46 |
|
|
@@ -49,3 +49,4 @@ with gr.Blocks(theme=gr.themes.Base()) as blocks:
|
|
| 49 |
# Run the app
|
| 50 |
blocks.launch()
|
| 51 |
|
|
|
|
|
|
| 1 |
+
iimport gradio as gr
|
| 2 |
import wave
|
| 3 |
import numpy as np
|
| 4 |
from io import BytesIO
|
|
|
|
| 40 |
gr.Markdown("# Text to Speech Synthesizer")
|
| 41 |
gr.Markdown("Enter text to synthesize it into speech using PiperVoice.")
|
| 42 |
input_text = gr.Textbox(label="Input Text")
|
| 43 |
+
output_audio = gr.Audio(label="Synthesized Speech", type="numpy", live=True) # Set live=True
|
| 44 |
output_text = gr.Textbox(label="Output Text", visible=False) # This is the new text output component
|
| 45 |
submit_button = gr.Button("Synthesize")
|
| 46 |
|
|
|
|
| 49 |
# Run the app
|
| 50 |
blocks.launch()
|
| 51 |
|
| 52 |
+
|