Blackbox MeloTTS created

This commit is contained in:
gdw6463
2024-05-13 19:17:30 +08:00
parent 4c51fa24da
commit 68d5088552
6 changed files with 95 additions and 18 deletions

View File

@ -31,10 +31,10 @@ class Configuration():
if cfg is None:
cfg = self.cfg
return self.get(path.split("."), cfg)
lenght = len(path)
if lenght == 0 or not isinstance(cfg, dict):
length = len(path)
if length == 0 or not isinstance(cfg, dict):
return None
if lenght == 1:
if length == 1:
return cfg.get(path[0])
return self.get(path[1:], cfg.get(path[0]))
@ -43,5 +43,13 @@ class TesouConf():
url: str
@inject
def __init__(self,config: Configuration) -> None:
def __init__(self, config: Configuration) -> None:
self.url = config.get("tesou.url")
class MeloConf():
melotts: str
@inject
def __init__(self, config: Configuration) -> None:
self.melotts = config.get("melotts.url")