Refactor localization files and remove Aliyun references

This commit is contained in:
2026-04-07 11:37:47 +08:00
parent 2662b494c5
commit b395cb0b98
47 changed files with 136 additions and 1311 deletions

View File

@@ -61,7 +61,6 @@ class AudiobookCharacterResponse(BaseModel):
voice_design_id: Optional[int] = None
voice_design_name: Optional[str] = None
voice_design_speaker: Optional[str] = None
use_indextts2: bool = False
model_config = ConfigDict(from_attributes=True)
@@ -105,7 +104,6 @@ class AudiobookCharacterEdit(BaseModel):
description: Optional[str] = None
instruct: Optional[str] = None
voice_design_id: Optional[int] = None
use_indextts2: Optional[bool] = None
class AudiobookSegmentResponse(BaseModel):

View File

@@ -24,7 +24,7 @@ class CustomVoiceRequest(BaseModel):
top_k: Optional[int] = Field(default=50, ge=1, le=100)
top_p: Optional[float] = Field(default=1.0, ge=0.0, le=1.0)
repetition_penalty: Optional[float] = Field(default=1.05, ge=1.0, le=2.0)
backend: Optional[str] = Field(default=None, description="Backend type: local or aliyun")
backend: Optional[str] = Field(default=None)
class VoiceDesignRequest(BaseModel):

View File

@@ -118,18 +118,11 @@ class PasswordChange(BaseModel):
raise ValueError('Passwords do not match')
return self
class AliyunKeyUpdate(BaseModel):
api_key: str = Field(..., min_length=1, max_length=500)
class AliyunKeyVerifyResponse(BaseModel):
valid: bool
message: str
class UserPreferences(BaseModel):
default_backend: str = Field(default="aliyun", pattern="^(local|aliyun)$")
default_backend: str = Field(default="local", pattern="^local$")
onboarding_completed: bool = Field(default=False)
class UserPreferencesResponse(BaseModel):
default_backend: str = Field(default="aliyun", pattern="^(local|aliyun)$")
default_backend: str = Field(default="local")
onboarding_completed: bool = Field(default=False)
available_backends: list[str] = Field(default=["aliyun"])
available_backends: list[str] = Field(default=["local"])

View File

@@ -5,8 +5,6 @@ from pydantic import BaseModel, Field
class VoiceDesignCreate(BaseModel):
name: str = Field(..., min_length=1, max_length=100)
instruct: str = Field(..., min_length=1)
backend_type: str = Field(..., pattern="^(local|aliyun)$")
aliyun_voice_id: Optional[str] = None
meta_data: Optional[Dict[str, Any]] = None
preview_text: Optional[str] = None
@@ -14,9 +12,7 @@ class VoiceDesignResponse(BaseModel):
id: int
user_id: int
name: str
backend_type: str
instruct: str
aliyun_voice_id: Optional[str]
meta_data: Optional[Dict[str, Any]]
preview_text: Optional[str]
ref_audio_path: Optional[str] = None