|
|
@ -86,7 +86,6 @@ else:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_bert_feature(text, word2ph):
|
|
|
|
def get_bert_feature(text, word2ph):
|
|
|
|
print(23333334444444,text,word2ph)
|
|
|
|
|
|
|
|
with torch.no_grad():
|
|
|
|
with torch.no_grad():
|
|
|
|
inputs = tokenizer(text, return_tensors="pt")
|
|
|
|
inputs = tokenizer(text, return_tensors="pt")
|
|
|
|
for i in inputs:
|
|
|
|
for i in inputs:
|
|
|
@ -405,7 +404,6 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language,
|
|
|
|
print(i18n("实际输入的目标文本(每句):"), text)
|
|
|
|
print(i18n("实际输入的目标文本(每句):"), text)
|
|
|
|
phones2, word2ph2, norm_text2 = get_cleaned_text_final(text, text_language)
|
|
|
|
phones2, word2ph2, norm_text2 = get_cleaned_text_final(text, text_language)
|
|
|
|
bert2 = get_bert_final(phones2, word2ph2, norm_text2, text_language, device).to(dtype)
|
|
|
|
bert2 = get_bert_final(phones2, word2ph2, norm_text2, text_language, device).to(dtype)
|
|
|
|
print(bert1,bert2)
|
|
|
|
|
|
|
|
bert = torch.cat([bert1, bert2], 1)
|
|
|
|
bert = torch.cat([bert1, bert2], 1)
|
|
|
|
|
|
|
|
|
|
|
|
all_phoneme_ids = torch.LongTensor(phones1 + phones2).to(device).unsqueeze(0)
|
|
|
|
all_phoneme_ids = torch.LongTensor(phones1 + phones2).to(device).unsqueeze(0)
|
|
|
|