Files
xiaoxia-saas/packages/application/voice_library/commands.py
T
xiaoxia 52ff2f80ad
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
style: apply black formatting to pass CI validation (#126)
2026-06-30 17:23:08 +08:00

41 lines
1.0 KiB
Python

"""Voice library commands."""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import List, Optional
@dataclass
class CreateVoiceLibraryCommand:
user_id: str
name: str
text: str = ""
voice_provider: str = ""
voice_id: str = ""
voice_name: str = ""
audio_url: str = ""
duration: float = 0
file_size: int = 0
status: str = "completed"
project_id: Optional[str] = None
tags: List[str] = field(default_factory=list)
metadata_: dict = field(default_factory=dict)
@dataclass
class UpdateVoiceLibraryCommand:
id: str # ID of the voice library item to update
user_id: str
name: Optional[str] = None
text: Optional[str] = None
voice_provider: Optional[str] = None
voice_id: Optional[str] = None
voice_name: Optional[str] = None
audio_url: Optional[str] = None
duration: Optional[float] = None
file_size: Optional[int] = None
status: Optional[str] = None
tags: Optional[List[str]] = None
metadata_: Optional[dict] = None