cymic commited on
Commit
4e6cd34
1 Parent(s): efeb950

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -304,7 +304,7 @@ if __name__ == "__main__":
304
  cus_dur_gn_btn = gr.Button("Regenerate with custom phoneme durations")
305
 
306
  download = gr.Button("Download Audio")
307
- download.click(None, [], [], _js=download_audio_js.format(audio_id="tts-audio"))
308
  with gr.Accordion(label="Speaking Pace Control", open=True):
309
 
310
  duration_output = gr.Textbox(label="Duration of each phoneme", placeholder="After you generate a sentence, the detailed information of each phoneme's duration will be presented here.",
@@ -318,7 +318,7 @@ if __name__ == "__main__":
318
  "注意这些数字只能是整数。 \n\n(1 代表 0.01161 秒的长度)\n\n"
319
  )
320
  btn.click(infer, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
321
- outputs=[text_output, audio_output, phoneme_output, duration_output], api_name="generate")
322
  cus_dur_gn_btn.click(infer_from_phoneme_dur, inputs=[duration_output, char_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider],
323
  outputs=[phoneme_output, audio_output])
324
 
 
304
  cus_dur_gn_btn = gr.Button("Regenerate with custom phoneme durations")
305
 
306
  download = gr.Button("Download Audio")
307
+ download.click(None, [], [], _js=download_audio_js.format(audio_id="tts-audio"), api_name="download_audio")
308
  with gr.Accordion(label="Speaking Pace Control", open=True):
309
 
310
  duration_output = gr.Textbox(label="Duration of each phoneme", placeholder="After you generate a sentence, the detailed information of each phoneme's duration will be presented here.",
 
318
  "注意这些数字只能是整数。 \n\n(1 代表 0.01161 秒的长度)\n\n"
319
  )
320
  btn.click(infer, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
321
+ outputs=[text_output, audio_output, phoneme_output, duration_output])
322
  cus_dur_gn_btn.click(infer_from_phoneme_dur, inputs=[duration_output, char_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider],
323
  outputs=[phoneme_output, audio_output])
324