Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ def synthesize_speech(text):
|
|
| 55 |
wav_file.setnchannels(1) # mono
|
| 56 |
|
| 57 |
# Synthesize speech
|
| 58 |
-
voice.synthesize(text, wav_file)
|
| 59 |
|
| 60 |
# Convert buffer to NumPy array for Gradio output
|
| 61 |
buffer.seek(0)
|
|
@@ -67,7 +67,7 @@ def synthesize_speech(text):
|
|
| 67 |
with gr.Blocks(theme=gr.themes.Base()) as blocks:
|
| 68 |
gr.Markdown("# Text to Speech Synthesizer")
|
| 69 |
gr.Markdown("Enter text to synthesize it into speech using PiperVoice.")
|
| 70 |
-
input_text =
|
| 71 |
output_audio = gr.Audio(label="Synthesized Speech", type="numpy")
|
| 72 |
submit_button = gr.Button("Synthesize")
|
| 73 |
|
|
|
|
| 55 |
wav_file.setnchannels(1) # mono
|
| 56 |
|
| 57 |
# Synthesize speech
|
| 58 |
+
voice.synthesize(preprocess_text(text), wav_file)
|
| 59 |
|
| 60 |
# Convert buffer to NumPy array for Gradio output
|
| 61 |
buffer.seek(0)
|
|
|
|
| 67 |
with gr.Blocks(theme=gr.themes.Base()) as blocks:
|
| 68 |
gr.Markdown("# Text to Speech Synthesizer")
|
| 69 |
gr.Markdown("Enter text to synthesize it into speech using PiperVoice.")
|
| 70 |
+
input_text = gr.Textbox(label="Input Text")
|
| 71 |
output_audio = gr.Audio(label="Synthesized Speech", type="numpy")
|
| 72 |
submit_button = gr.Button("Synthesize")
|
| 73 |
|