cymic commited on
Commit
b6627c1
1 Parent(s): 0d3dcb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -116,6 +116,12 @@ def to_symbol_fn(is_symbol_input, input_text, temp_text):
116
  return (_clean_text(input_text, hps.data.text_cleaners), input_text) if is_symbol_input \
117
  else (temp_text, temp_text)
118
 
 
 
 
 
 
 
119
  def infer(text_raw, character, language, duration, noise_scale, noise_scale_w, is_symbol):
120
  """
121
  infer
@@ -317,10 +323,9 @@ if __name__ == "__main__":
317
  "注意这些数字只能是整数。 \n\n(1 代表 0.01161 秒的长度)\n\n"
318
  )
319
 
320
- monkey_patch()
321
 
322
- btn.click(infer, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
323
- outputs=[text_output, audio_output, phoneme_output, duration_output])#, api_name="1")
324
  cus_dur_gn_btn.click(infer_from_phoneme_dur, inputs=[duration_output, char_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider],
325
  outputs=[phoneme_output, audio_output])#, api_name="2")
326
 
 
116
  return (_clean_text(input_text, hps.data.text_cleaners), input_text) if is_symbol_input \
117
  else (temp_text, temp_text)
118
 
119
+ def infer2(text_raw, character, language, duration, noise_scale, noise_scale_w, is_symbol):
120
+ """
121
+ infer
122
+ """
123
+ return (None, None, None, None)
124
+
125
  def infer(text_raw, character, language, duration, noise_scale, noise_scale_w, is_symbol):
126
  """
127
  infer
 
323
  "注意这些数字只能是整数。 \n\n(1 代表 0.01161 秒的长度)\n\n"
324
  )
325
 
 
326
 
327
+ btn.click(infer2, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
328
+ outputs=[text_output, audio_output, phoneme_output, duration_output], api_name="1")
329
  cus_dur_gn_btn.click(infer_from_phoneme_dur, inputs=[duration_output, char_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider],
330
  outputs=[phoneme_output, audio_output])#, api_name="2")
331