lj1995 commited on
Commit
43e9a62
ยท
verified ยท
1 Parent(s): dbefee0

Update inference_webui.py

Browse files
Files changed (1) hide show
  1. inference_webui.py +5 -5
inference_webui.py CHANGED
@@ -478,12 +478,12 @@ def get_tts_wav(
478
  prompt_text = prompt_text.strip("\n")
479
  if prompt_text[-1] not in splits:
480
  prompt_text += "ใ€‚" if prompt_language != "en" else "."
481
- print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„ๅ‚่€ƒๆ–‡ๆœฌ:").key, prompt_text)
482
  text = text.strip("\n")
483
  if text[0] not in splits and len(get_first(text)) < 4:
484
  text = "ใ€‚" + text if text_language != "en" else "." + text
485
 
486
- print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„็›ฎๆ ‡ๆ–‡ๆœฌ:").key, text)
487
  zero_wav = np.zeros(
488
  int(hps.data.sampling_rate * 0.3),
489
  dtype=np.float16 if is_half == True else np.float32,
@@ -527,7 +527,7 @@ def get_tts_wav(
527
  text = cut5(text)
528
  while "\n\n" in text:
529
  text = text.replace("\n\n", "\n")
530
- print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„็›ฎๆ ‡ๆ–‡ๆœฌ(ๅˆ‡ๅฅๅŽ):").key, text)
531
  texts = text.split("\n")
532
  texts = process_text(texts)
533
  texts = merge_short_text_in_array(texts, 5)
@@ -543,9 +543,9 @@ def get_tts_wav(
543
  continue
544
  if text[-1] not in splits:
545
  text += "ใ€‚" if text_language != "en" else "."
546
- print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„็›ฎๆ ‡ๆ–‡ๆœฌ(ๆฏๅฅ):").key, text)
547
  phones2, bert2, norm_text2 = get_phones_and_bert(text, text_language, version)
548
- print(i18n("ๅ‰็ซฏๅค„็†ๅŽ็š„ๆ–‡ๆœฌ(ๆฏๅฅ):").key, norm_text2)
549
  if not ref_free:
550
  bert = torch.cat([bert1, bert2], 1)
551
  all_phoneme_ids = torch.LongTensor(phones1 + phones2).to(device).unsqueeze(0)
 
478
  prompt_text = prompt_text.strip("\n")
479
  if prompt_text[-1] not in splits:
480
  prompt_text += "ใ€‚" if prompt_language != "en" else "."
481
+ print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„ๅ‚่€ƒๆ–‡ๆœฌ:"), prompt_text)
482
  text = text.strip("\n")
483
  if text[0] not in splits and len(get_first(text)) < 4:
484
  text = "ใ€‚" + text if text_language != "en" else "." + text
485
 
486
+ print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„็›ฎๆ ‡ๆ–‡ๆœฌ:"), text)
487
  zero_wav = np.zeros(
488
  int(hps.data.sampling_rate * 0.3),
489
  dtype=np.float16 if is_half == True else np.float32,
 
527
  text = cut5(text)
528
  while "\n\n" in text:
529
  text = text.replace("\n\n", "\n")
530
+ print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„็›ฎๆ ‡ๆ–‡ๆœฌ(ๅˆ‡ๅฅๅŽ):"), text)
531
  texts = text.split("\n")
532
  texts = process_text(texts)
533
  texts = merge_short_text_in_array(texts, 5)
 
543
  continue
544
  if text[-1] not in splits:
545
  text += "ใ€‚" if text_language != "en" else "."
546
+ print(i18n("ๅฎž้™…่พ“ๅ…ฅ็š„็›ฎๆ ‡ๆ–‡ๆœฌ(ๆฏๅฅ):"), text)
547
  phones2, bert2, norm_text2 = get_phones_and_bert(text, text_language, version)
548
+ print(i18n("ๅ‰็ซฏๅค„็†ๅŽ็š„ๆ–‡ๆœฌ(ๆฏๅฅ):"), norm_text2)
549
  if not ref_free:
550
  bert = torch.cat([bert1, bert2], 1)
551
  all_phoneme_ids = torch.LongTensor(phones1 + phones2).to(device).unsqueeze(0)