Skip to content

Commit

Permalink
fix address #178
Browse files Browse the repository at this point in the history
  • Loading branch information
SWivid committed Oct 19, 2024
1 parent 84cb6e5 commit a016d6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gradio_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions inference-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a016d6f

Please sign in to comment.