From 81ce0cc1f7b4c2626cf3458dd4ce8d6bd833294a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stardust=C2=B7=E5=87=8F?= Date: Sat, 30 Sep 2023 19:49:44 +0800 Subject: [PATCH] Update bert_gen.py --- bert_gen.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bert_gen.py b/bert_gen.py index fb9b550f7..bffdf54c6 100644 --- a/bert_gen.py +++ b/bert_gen.py @@ -31,13 +31,13 @@ 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: - bert = get_bert(text, word2ph, language_str, device) - assert bert.shape[-1] == len(phone) - torch.save(bert, bert_path) + #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) if __name__ == "__main__":