mrfakename commited on
Commit
364456d
1 Parent(s): 0ac3155

Sync from GitHub repo

Browse files

This Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there

Files changed (2) hide show
  1. app.py +2 -2
  2. inference-cli.py +2 -2
app.py CHANGED
@@ -149,10 +149,10 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
149
  generated_waves = []
150
  spectrograms = []
151
 
 
 
152
  for i, gen_text in enumerate(progress.tqdm(gen_text_batches)):
153
  # Prepare the text
154
- if len(ref_text[-1].encode('utf-8')) == 1:
155
- ref_text = ref_text + " "
156
  text_list = [ref_text + gen_text]
157
  final_text_list = convert_char_to_pinyin(text_list)
158
 
 
149
  generated_waves = []
150
  spectrograms = []
151
 
152
+ if len(ref_text[-1].encode('utf-8')) == 1:
153
+ ref_text = ref_text + " "
154
  for i, gen_text in enumerate(progress.tqdm(gen_text_batches)):
155
  # Prepare the text
 
 
156
  text_list = [ref_text + gen_text]
157
  final_text_list = convert_char_to_pinyin(text_list)
158
 
inference-cli.py CHANGED
@@ -241,10 +241,10 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, model,ckpt_file,file_voca
241
  generated_waves = []
242
  spectrograms = []
243
 
 
 
244
  for i, gen_text in enumerate(tqdm.tqdm(gen_text_batches)):
245
  # Prepare the text
246
- if len(ref_text[-1].encode('utf-8')) == 1:
247
- ref_text = ref_text + " "
248
  text_list = [ref_text + gen_text]
249
  final_text_list = convert_char_to_pinyin(text_list)
250
 
 
241
  generated_waves = []
242
  spectrograms = []
243
 
244
+ if len(ref_text[-1].encode('utf-8')) == 1:
245
+ ref_text = ref_text + " "
246
  for i, gen_text in enumerate(tqdm.tqdm(gen_text_batches)):
247
  # Prepare the text
 
 
248
  text_list = [ref_text + gen_text]
249
  final_text_list = convert_char_to_pinyin(text_list)
250