mrfakename commited on
Commit
133fc35
1 Parent(s): 43fa799

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -80,9 +80,9 @@ def generate_response(messages, model, tokenizer):
80
 
81
  @gpu_decorator
82
  def infer(
83
- ref_audio_orig, ref_text, gen_text, model, remove_silence, cross_fade_duration=0.15, speed=1, show_info=gr.Info
84
  ):
85
- ref_audio, ref_text = preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=show_info)
86
 
87
  if model == "F5-TTS":
88
  ema_model = F5TTS_ema_model
@@ -97,7 +97,6 @@ def infer(
97
  vocoder,
98
  cross_fade_duration=cross_fade_duration,
99
  speed=speed,
100
- show_info=show_info,
101
  progress=gr.Progress(),
102
  )
103
 
@@ -405,7 +404,7 @@ with gr.Blocks() as app_multistyle:
405
 
406
  # Generate speech for this segment
407
  audio, _ = infer(
408
- ref_audio, ref_text, text, model_choice, remove_silence, 0, show_info=print
409
  ) # show_info=print no pull to top when generating
410
  sr, audio_data = audio
411
 
@@ -727,4 +726,4 @@ if __name__ == "__main__":
727
  if not USING_SPACES:
728
  main()
729
  else:
730
- app.queue().launch()
 
80
 
81
  @gpu_decorator
82
  def infer(
83
+ ref_audio_orig, ref_text, gen_text, model, remove_silence, cross_fade_duration=0.15, speed=1
84
  ):
85
+ ref_audio, ref_text = preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=gr.Info)
86
 
87
  if model == "F5-TTS":
88
  ema_model = F5TTS_ema_model
 
97
  vocoder,
98
  cross_fade_duration=cross_fade_duration,
99
  speed=speed,
 
100
  progress=gr.Progress(),
101
  )
102
 
 
404
 
405
  # Generate speech for this segment
406
  audio, _ = infer(
407
+ ref_audio, ref_text, text, model_choice, remove_silence, 0
408
  ) # show_info=print no pull to top when generating
409
  sr, audio_data = audio
410
 
 
726
  if not USING_SPACES:
727
  main()
728
  else:
729
+ app.queue().launch()