From f6c1d5c507c7bce8b416ee5979fd4caadb518b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stardust=C2=B7=E5=87=8F?= Date: Sat, 23 Dec 2023 11:28:42 +0800 Subject: [PATCH] Update __init__.py --- text/__init__.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/text/__init__.py b/text/__init__.py index 98276d2..cd31324 100644 --- a/text/__init__.py +++ b/text/__init__.py @@ -30,25 +30,6 @@ def get_bert(norm_text, word2ph, language, device, style_text=None, style_weight return bert -def check_bert_models(): - import json - from pathlib import Path - - from config import config - from .bert_utils import _check_bert - - if config.mirror.lower() == "openi": - import openi - - kwargs = {"token": config.openi_token} if config.openi_token else {} - openi.login(**kwargs) - - with open("./bert/bert_models.json", "r") as fp: - models = json.load(fp) - for k, v in models.items(): - local_path = Path("./bert").joinpath(k) - _check_bert(v["repo_id"], v["files"], local_path) - def init_openjtalk(): import platform @@ -60,4 +41,3 @@ def init_openjtalk(): init_openjtalk() -check_bert_models()