fix address #178

This commit is contained in:
SWivid
2024-10-19 21:59:52 +08:00
parent 84cb6e5f00
commit a016d6f89c
2 changed files with 4 additions and 4 deletions

View File

@@ -149,10 +149,10 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
generated_waves = []
spectrograms = []
if len(ref_text[-1].encode('utf-8')) == 1:
ref_text = ref_text + " "
for i, gen_text in enumerate(progress.tqdm(gen_text_batches)):
# Prepare the text
if len(ref_text[-1].encode('utf-8')) == 1:
ref_text = ref_text + " "
text_list = [ref_text + gen_text]
final_text_list = convert_char_to_pinyin(text_list)

View File

@@ -241,10 +241,10 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, model,ckpt_file,file_voca
generated_waves = []
spectrograms = []
if len(ref_text[-1].encode('utf-8')) == 1:
ref_text = ref_text + " "
for i, gen_text in enumerate(tqdm.tqdm(gen_text_batches)):
# Prepare the text
if len(ref_text[-1].encode('utf-8')) == 1:
ref_text = ref_text + " "
text_list = [ref_text + gen_text]
final_text_list = convert_char_to_pinyin(text_list)