from ..schemas.speech import TextToSpeechRequest, TextToSpeechResponse from ..providers.speech_provider import SpeechProvider class SpeechService: def __init__(self, provider: SpeechProvider) -> None: self._provider = provider def text_to_speech(self, req: TextToSpeechRequest) -> TextToSpeechResponse: return self._provider.text_to_speech( req.volume, req.pitch, req.rate, req.filename, req.text, model=req.model, )