mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-14 00:53:25 +00:00
ftemp
This commit is contained in:
@ -12,8 +12,8 @@ class BlackboxFactory:
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.tts = TTS()
|
||||
#self.asr = ASR("./.env.yaml")
|
||||
#self.sentiment = Sentiment()
|
||||
self.asr = ASR(".env.yaml")
|
||||
self.sentiment = Sentiment()
|
||||
#self.sum = SUM()
|
||||
#self.calculator = Calculator()
|
||||
#self.audio_to_text = AudioToText()
|
||||
@ -24,7 +24,6 @@ class BlackboxFactory:
|
||||
return self.processing(*args, **kwargs)
|
||||
|
||||
def create_blackbox(self, blackbox_name: str) -> Blackbox:
|
||||
return self.tts
|
||||
if blackbox_name == "audio_to_text":
|
||||
return self.audio_to_text
|
||||
if blackbox_name == "text_to_audio":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import io
|
||||
from ntpath import join
|
||||
|
||||
from fastapi import Request, Response, status
|
||||
from fastapi.responses import JSONResponse
|
||||
@ -8,12 +9,7 @@ from tts.tts_service import TTService
|
||||
class TTS(Blackbox):
|
||||
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
config = {
|
||||
'paimon': ['resources/tts/models/paimon6k.json', 'resources/tts/models/paimon6k_390k.pth', 'character_paimon', 1],
|
||||
'yunfei': ['resources/tts/models/yunfeimix2.json', 'resources/tts/models/yunfeimix2_53k.pth', 'character_yunfei', 1.1],
|
||||
'catmaid': ['resources/tts/models/catmix.json', 'resources/tts/models/catmix_107k.pth', 'character_catmaid', 1.2]
|
||||
}
|
||||
self.tts_service = TTService(*config['catmaid'])
|
||||
self.tts_service = TTService("catmaid")
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return self.processing(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user