tts-openai / src /model /tts_response.py
imseldrith's picture
Upload folder using huggingface_hub (#1)
2f07364 verified
raw
history blame contribute delete
461 Bytes
from typing import List
from pydantic import BaseModel
from src.model.language import Language
class AudioFile(BaseModel):
audioContent: str
class AudioConfig(BaseModel):
language: Language
audioFormat: str = 'wav'
encoding: str = 'base64'
samplingRate: int = 22050
class TTSResponse(BaseModel):
audio: List[AudioFile]
config: AudioConfig
class TTSFailureResponse(BaseModel):
status: str = 'ERROR'
status_text: str