feat: blackbox call

This commit is contained in:
Dan Chen
2024-03-21 15:59:35 +08:00
parent 726b926d98
commit 11e1659e22
12 changed files with 49 additions and 13 deletions

View File

@ -18,6 +18,9 @@ class TTS(Blackbox):
self.tts_service = TTService(*config['catmaid'])
super().__init__(config)
def __call__(self, *args, **kwargs):
return self.processing(*args, **kwargs)
def processing(self, *args, **kwargs) -> io.BytesIO:
text = args[0]
audio = self.tts_service.read(text)