From f8ebfe427307d10bf6e179ac84804cf398dbdc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stardust=C2=B7=E5=87=8F?= Date: Tue, 5 Sep 2023 22:22:06 +0800 Subject: [PATCH] Update bert_gen.py --- bert_gen.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bert_gen.py b/bert_gen.py index 80a2695..f13ff4d 100644 --- a/bert_gen.py +++ b/bert_gen.py @@ -35,12 +35,9 @@ def process_line(line): bert = torch.load(bert_path) assert bert.shape[-1] == len(phone) except Exception: - try: - bert = get_bert(text, word2ph, language_str,device) - assert bert.shape[-1] == len(phone) - torch.save(bert, bert_path) - except Exception: - print(text) + bert = get_bert(text, word2ph, language_str,device) + assert bert.shape[-1] == len(phone) + torch.save(bert, bert_path) if __name__ == "__main__":