hynt commited on
Commit
d13d365
·
1 Parent(s): a3b204a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -43,8 +43,10 @@ def infer_tts(ref_audio_orig: str, gen_text: str, speed: float = 1.0, request: g
43
  gen_texts = chunk_text(gen_text)
44
  final_wave_total = None
45
  final_sample_rate = 24000
 
46
  for i, gen_text in enumerate(gen_texts):
47
- ref_audio, ref_text = preprocess_ref_audio_text(ref_audio_orig, "")
 
48
  final_wave = generate_sentence(
49
  ref_text.lower(),
50
  ref_audio,
 
43
  gen_texts = chunk_text(gen_text)
44
  final_wave_total = None
45
  final_sample_rate = 24000
46
+ ref_audio, ref_text = "", ""
47
  for i, gen_text in enumerate(gen_texts):
48
+ if i == 0:
49
+ ref_audio, ref_text = preprocess_ref_audio_text(ref_audio_orig, "")
50
  final_wave = generate_sentence(
51
  ref_text.lower(),
52
  ref_audio,