add cosyvoicetts

This commit is contained in:
0Xiao0
2024-07-29 10:24:44 +08:00
parent 5bb80d396b
commit 0315955a38
7 changed files with 142 additions and 4 deletions

View File

@ -65,6 +65,23 @@ class MeloConf():
self.language = config.get("melotts.language")
self.speaker = config.get("melotts.speaker")
class CosyVoiceConf():
mode: str
url: str
speed: int
device: str
language: str
speaker: str
@inject
def __init__(self, config: Configuration) -> None:
self.mode = config.get("cosyvoicetts.mode")
self.url = config.get("cosyvoicetts.url")
self.speed = config.get("cosyvoicetts.speed")
self.device = config.get("cosyvoicetts.device")
self.language = config.get("cosyvoicetts.language")
self.speaker = config.get("cosyvoicetts.speaker")
# 'CRITICAL': CRITICAL,
# 'FATAL': FATAL,
# 'ERROR': ERROR,