init (not checked bat script yet)

This commit is contained in:
litagin02
2023-12-27 05:37:46 +09:00
parent 11a1e7e80d
commit 58fab45b84
235 changed files with 2831 additions and 773509 deletions

View File

@@ -28,36 +28,3 @@ def get_bert(norm_text, word2ph, language, device, style_text=None, style_weight
norm_text, word2ph, device, style_text, 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
if platform.platform() == "Linux":
import pyopenjtalk
pyopenjtalk.g2p("こんにちは,世界。")
init_openjtalk()
check_bert_models()