Update bert_gen.py
This commit is contained in:
14
bert_gen.py
14
bert_gen.py
@@ -31,13 +31,13 @@ def process_line(line):
|
|||||||
|
|
||||||
bert_path = wav_path.replace(".wav", ".bert.pt")
|
bert_path = wav_path.replace(".wav", ".bert.pt")
|
||||||
|
|
||||||
try:
|
#try:
|
||||||
bert = torch.load(bert_path)
|
#bert = torch.load(bert_path)
|
||||||
assert bert.shape[-1] == len(phone)
|
#assert bert.shape[-1] == len(phone)
|
||||||
except Exception:
|
#except Exception:
|
||||||
bert = get_bert(text, word2ph, language_str, device)
|
bert = get_bert(text, word2ph, language_str, device)
|
||||||
assert bert.shape[-1] == len(phone)
|
assert bert.shape[-1] == len(phone)
|
||||||
torch.save(bert, bert_path)
|
torch.save(bert, bert_path)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user