add asr and tts with settings

This commit is contained in:
0Xiao0
2024-08-22 15:26:27 +08:00
parent abb5195e55
commit c247d611a0
28 changed files with 626 additions and 82 deletions

View File

@ -81,6 +81,23 @@ class CosyVoiceConf():
self.device = config.get("cosyvoicetts.device")
self.language = config.get("cosyvoicetts.language")
self.speaker = config.get("cosyvoicetts.speaker")
class SenseVoiceConf():
mode: str
url: str
speed: int
device: str
language: str
speaker: str
@inject
def __init__(self, config: Configuration) -> None:
self.mode = config.get("sensevoiceasr.mode")
self.url = config.get("sensevoiceasr.url")
self.speed = config.get("sensevoiceasr.speed")
self.device = config.get("sensevoiceasr.device")
self.language = config.get("sensevoiceasr.language")
self.speaker = config.get("sensevoiceasr.speaker")
# 'CRITICAL': CRITICAL,
# 'FATAL': FATAL,
@ -110,6 +127,7 @@ class LogConf():
self.filename = config.get("log.filename")
self.time_format = config.get("log.time_format", default=DEFAULT_TIME_FORMAT)
@singleton
class EnvConf():
version: str
@ -128,4 +146,11 @@ class BlackboxConf():
@inject
def __init__(self, config: Configuration) -> None:
self.lazyloading = bool(config.get("blackbox.lazyloading", default=False))
self.lazyloading = bool(config.get("blackbox.lazyloading", default=False))
@singleton
class VLMConf():
@inject
def __init__(self, config: Configuration) -> None:
self.url = config.get("vlms.url")