feat: audio chat

This commit is contained in:
superobk
2024-04-08 17:21:44 +08:00
parent 703bdaec5a
commit 41621b44f7
4 changed files with 42 additions and 3 deletions

View File

@ -1,3 +1,4 @@
from .audio_chat import AudioChat
from .sum import SUM
from .sentiment import Sentiment
from .tts import TTS
@ -19,6 +20,7 @@ class BlackboxFactory:
self.audio_to_text = AudioToText()
self.text_to_audio = TextToAudio()
self.tesou = Tesou()
self.audio_chat = AudioChat(self.asr, self.tesou, self.tts)
def __call__(self, *args, **kwargs):
return self.processing(*args, **kwargs)
@ -40,4 +42,6 @@ class BlackboxFactory:
return self.sum
if blackbox_name == "tesou":
return self.tesou
if blackbox_name == "audio_chat":
return self.audio_chat
raise ValueError("Invalid blockbox type")