Vihang28 commited on
Commit
db99199
·
verified ·
1 Parent(s): 86ec9c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -40,6 +40,9 @@ def show_error(text):
40
  else:
41
  return gr.update(visible=False), gr.update(visible=True)
42
 
 
 
 
43
  title = "Voice-Cloning-Demo"
44
 
45
  def toggle(choice):
@@ -77,7 +80,7 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
77
  download_button = gr.DownloadButton(label="Download Audio", value=None, visible=True)
78
  error_box = gr.Textbox(label="WARNING", value="Input box cannot be blank!!", visible=False, container=True)
79
 
80
- download_button.click(inputs=audio_output, outputs=audio_output)
81
  btn_clear.add(audio_output)
82
  btn.click(text_to_speech, inputs=[text_input, audio_input_mic, audio_input_file], outputs=audio_output)
83
  btn.click(show_error, text_input, [error_box, audio_output])
 
40
  else:
41
  return gr.update(visible=False), gr.update(visible=True)
42
 
43
+ def download_file(aud_file):
44
+ return aud_file
45
+
46
  title = "Voice-Cloning-Demo"
47
 
48
  def toggle(choice):
 
80
  download_button = gr.DownloadButton(label="Download Audio", value=None, visible=True)
81
  error_box = gr.Textbox(label="WARNING", value="Input box cannot be blank!!", visible=False, container=True)
82
 
83
+ download_button.click(download_file, inputs=audio_output, outputs=audio_output)
84
  btn_clear.add(audio_output)
85
  btn.click(text_to_speech, inputs=[text_input, audio_input_mic, audio_input_file], outputs=audio_output)
86
  btn.click(show_error, text_input, [error_box, audio_output])