Files
encoach_backend/app/services/abc/third_parties/tts.py
2024-11-06 11:01:39 +00:00

23 lines
516 B
Python

from abc import ABC, abstractmethod
from typing import Union
class ITextToSpeechService(ABC):
@abstractmethod
async def synthesize_speech(self, text: str, voice: str, engine: str, output_format: str):
pass
@abstractmethod
async def text_to_speech(self, dialog) -> bytes:
pass
@abstractmethod
async def _conversation_to_speech(self, conversation: list):
pass
@abstractmethod
async def _text_to_speech(self, text: str):
pass