Spaces:
Sleeping
Sleeping
| """Pydantic models for audio endpoints.""" | |
| from typing import Optional | |
| from pydantic import BaseModel, HttpUrl, conint, constr | |
| class AudioUploadRequest(BaseModel): | |
| iteration_timestamp: constr(strip_whitespace=True, min_length=1) | |
| slide_index: conint(ge=0) | |
| audio_url: HttpUrl | |
| filename: Optional[constr(strip_whitespace=True, min_length=1)] = None | |
| speaking_rate: Optional[float] = None | |
| original_text: Optional[str] = None | |
| class AudioUploadResponse(BaseModel): | |
| status: str = "ok" | |
| saved_url: HttpUrl | |
| checksum: Optional[str] = None | |
| duration_seconds: Optional[float] = None | |