feat: tts

This commit is contained in:
superobk
2024-03-19 17:33:09 +08:00
parent 2dccf5e78d
commit f2d6b9e526
90 changed files with 533580 additions and 5 deletions

View File

@ -1,3 +1,4 @@
from .tts import TTS
from ..asr.asr import ASR
from .audio_to_text import AudioToText
from .blackbox import Blackbox
@ -8,8 +9,8 @@ from .text_to_audio import TextToAudio
class BlackboxFactory:
def __init__(self) -> None:
self.tts = TTS()
self.asr = ASR("./.env.yaml")
pass
def create_blackbox(self, blackbox_name: str, blackbox_config: dict) -> Blackbox:
if blackbox_name == "audio_to_text":
@ -20,4 +21,6 @@ class BlackboxFactory:
return Calculator(blackbox_config)
if blackbox_name == "asr":
return self.asr
if blackbox_name == "tts":
return self.tts
raise ValueError("Invalid blockbox type")