Update bert_gen.py

This commit is contained in:
Stardust·减
2023-09-30 19:49:44 +08:00
committed by GitHub
parent 9587a6361b
commit 81ce0cc1f7

View File

@@ -31,10 +31,10 @@ def process_line(line):
bert_path = wav_path.replace(".wav", ".bert.pt")
try:
bert = torch.load(bert_path)
assert bert.shape[-1] == len(phone)
except Exception:
#try:
#bert = torch.load(bert_path)
#assert bert.shape[-1] == len(phone)
#except Exception:
bert = get_bert(text, word2ph, language_str, device)
assert bert.shape[-1] == len(phone)
torch.save(bert, bert_path)