amirgame197 commited on
Commit
0c68eb3
·
verified ·
1 Parent(s): 1282958

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -61,15 +61,14 @@ def synthesize_speech(text):
61
  buffer.seek(0)
62
  audio_data = np.frombuffer(buffer.read(), dtype=np.int16)
63
 
64
- return audio_data.tobytes(), None
65
 
66
  # Using Gradio Blocks
67
  with gr.Blocks(theme=gr.themes.Base()) as blocks:
68
  input_text = gr.Textbox(label="Input")
69
  output_audio = gr.Audio(label="Output", type="filepath")
70
- output_text = gr.Textbox(label="Output Text") # This is the new text output component
71
  submit_button = gr.Button("Synthesize")
72
 
73
- submit_button.click(synthesize_speech, inputs=input_text, outputs=[output_audio, output_text])
74
  # Run the app
75
  blocks.launch()
 
61
  buffer.seek(0)
62
  audio_data = np.frombuffer(buffer.read(), dtype=np.int16)
63
 
64
+ return audio_data.tobytes()
65
 
66
  # Using Gradio Blocks
67
  with gr.Blocks(theme=gr.themes.Base()) as blocks:
68
  input_text = gr.Textbox(label="Input")
69
  output_audio = gr.Audio(label="Output", type="filepath")
 
70
  submit_button = gr.Button("Synthesize")
71
 
72
+ submit_button.click(synthesize_speech, inputs=input_text, outputs=[output_audio])
73
  # Run the app
74
  blocks.launch()