BaseAudioModel
init
- api_key (Optional[str]): API key for the audio service. If not provided, will look for an environment variable specific to the implementation.
- url (Optional[str]): Base URL for the audio API. If not provided, will use a default URL or look for an environment variable specific to the implementation.
- timeout (Optional[float], optional): The timeout value in seconds for API calls. If not provided, will fall back to the MODEL_TIMEOUT environment variable or default to 180 seconds. (default: :obj:
None
)
text_to_speech
- input (str): The text to be converted to speech.
- storage_path (str): The local path to store the generated speech file. **kwargs (Any): Extra kwargs passed to the TTS API.
speech_to_text
- audio_file_path (str): The audio file path to transcribe. **kwargs (Any): Extra keyword arguments passed to the Speech-to-Text (STT) API.
_ensure_directory_exists
- file_path (str): The file path for which to ensure the directory exists.