# Abstract Base Class For Text-to-Speech (TTS) Engines from abc import ABC, abstractmethod class BaseTTS(ABC): @abstractmethod def __init__(self, config): pass @abstractmethod def synthesize_one(self, text) -> bytes | str: # Synthesize a single text input and return the audio data (e.g., as bytes or a file path) pass @abstractmethod def synthesize_batch(self, texts) -> list[bytes | str]: # Synthesize a batch of text inputs and return a list of audio data (e.g., as bytes or file paths) pass