cymic commited on
Commit
c77dda2
·
1 Parent(s): e8f5b59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -188,7 +188,7 @@ def infer(text_raw, character, language, duration, noise_scale, noise_scale_w, i
188
  if language != '日本語':
189
  print(f"translate from {language}: {text_raw}")
190
  show_memory_info(str(currentDateAndTime) + " infer调用后")
191
- return (text,(22050, audio), jp2phoneme, duration_info_str)
192
 
193
  def infer_from_phoneme_dur(duration_info_str, character, duration, noise_scale, noise_scale_w):
194
  """
@@ -315,10 +315,11 @@ if __name__ == "__main__":
315
  "您可以手动修改这些数字来控制每个音素以及间隔的长度,从而完全控制合成音频的说话节奏。"
316
  "注意这些数字只能是整数。 \n\n(1 代表 0.01161 秒的长度)\n\n"
317
  )
318
- def a1(textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input):
319
- pass
320
- btn.click(a1, [textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input], [], api_name="download_audio2")
321
- #btn.click(infer2, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
 
322
  # outputs=[text_output, audio_output, phoneme_output, duration_output], api_name="1")
323
  cus_dur_gn_btn.click(infer_from_phoneme_dur, inputs=[duration_output, char_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider],
324
  outputs=[phoneme_output, audio_output])#, api_name="2")
 
188
  if language != '日本語':
189
  print(f"translate from {language}: {text_raw}")
190
  show_memory_info(str(currentDateAndTime) + " infer调用后")
191
+ #return (text,(22050, audio), jp2phoneme, duration_info_str)
192
 
193
  def infer_from_phoneme_dur(duration_info_str, character, duration, noise_scale, noise_scale_w):
194
  """
 
315
  "您可以手动修改这些数字来控制每个音素以及间隔的长度,从而完全控制合成音频的说话节奏。"
316
  "注意这些数字只能是整数。 \n\n(1 代表 0.01161 秒的长度)\n\n"
317
  )
318
+ #def a1(textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input):
319
+ # pass
320
+ #btn.click(a1, [textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input], [], api_name="download_audio2")
321
+ btn.click(infer2, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
322
+ outputs=[], api_name="1")
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")