TTS & cuda processing updated

This commit is contained in:
superobk
2024-04-10 10:13:36 +08:00
parent c104ea52b5
commit bab055e7d6
4 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import io
import time
from ntpath import join
from fastapi import Request, Response, status
@ -16,7 +17,9 @@ class TTS(Blackbox):
def processing(self, *args, **kwargs) -> io.BytesIO:
text = args[0]
current_time = time.time()
audio = self.tts_service.read(text)
print("#### TTS Service consume : ", (time.time()-current_time))
return audio
def valid(self, *args, **kwargs) -> bool: