Files
Canto/canto-backend/schemas/voice_design.py
bdim404 2fa9c1fcb6 refactor: rename backend/frontend dirs and remove NovelWriter submodule
- Rename qwen3-tts-backend → canto-backend
- Rename qwen3-tts-frontend → canto-frontend
- Remove NovelWriter embedded repo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 18:03:29 +08:00

29 lines
766 B
Python

from typing import Optional, Dict, Any, List
from datetime import datetime
from pydantic import BaseModel, Field
class VoiceDesignCreate(BaseModel):
name: str = Field(..., min_length=1, max_length=100)
instruct: str = Field(..., min_length=1)
meta_data: Optional[Dict[str, Any]] = None
preview_text: Optional[str] = None
class VoiceDesignResponse(BaseModel):
id: int
user_id: int
name: str
instruct: str
meta_data: Optional[Dict[str, Any]]
preview_text: Optional[str]
ref_audio_path: Optional[str] = None
created_at: datetime
last_used: datetime
use_count: int
class Config:
from_attributes = True
class VoiceDesignListResponse(BaseModel):
designs: List[VoiceDesignResponse]
total: int