Сервис для хранения файлов аудио, индексации файлов, записи и выдачи результатов распознавания
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
555 B

from pydantic import BaseModel, Field
from typing import Optional, Dict, Any
from datetime import datetime
import uuid
class AudioBase(BaseModel):
filename: str = Field(..., max_length=255)
file_path: Optional[str] = None
duration: Optional[float] = None
file_size: Optional[int] = None
class AudioCreate(AudioBase):
pass
class AudioResponse(AudioBase):
id: uuid.UUID
index_date: datetime
class Config:
from_attributes = True
class AudioListResponse(BaseModel):
audios: list[AudioResponse]
count: int