Spaces:
Running
on
Zero
Running
on
Zero
Update inference_webui.py
Browse files- 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("ๅฎ้
่พๅ
ฅ็ๅ่ๆๆฌ:")
|
| 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("ๅฎ้
่พๅ
ฅ็็ฎๆ ๆๆฌ:")
|
| 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("ๅฎ้
่พๅ
ฅ็็ฎๆ ๆๆฌ(ๅๅฅๅ):")
|
| 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("ๅฎ้
่พๅ
ฅ็็ฎๆ ๆๆฌ(ๆฏๅฅ):")
|
| 547 |
phones2, bert2, norm_text2 = get_phones_and_bert(text, text_language, version)
|
| 548 |
-
print(i18n("ๅ็ซฏๅค็ๅ็ๆๆฌ(ๆฏๅฅ):")
|
| 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)
|