Refactor localization files and remove Aliyun references
This commit is contained in:
@@ -33,9 +33,7 @@ def to_voice_design_response(design) -> VoiceDesignResponse:
|
||||
id=design.id,
|
||||
user_id=design.user_id,
|
||||
name=design.name,
|
||||
backend_type=design.backend_type,
|
||||
instruct=design.instruct,
|
||||
aliyun_voice_id=design.aliyun_voice_id,
|
||||
meta_data=meta_data,
|
||||
preview_text=design.preview_text,
|
||||
ref_audio_path=design.ref_audio_path,
|
||||
@@ -58,8 +56,6 @@ async def save_voice_design(
|
||||
user_id=current_user.id,
|
||||
name=data.name,
|
||||
instruct=data.instruct,
|
||||
backend_type=data.backend_type,
|
||||
aliyun_voice_id=data.aliyun_voice_id,
|
||||
meta_data=data.meta_data,
|
||||
preview_text=data.preview_text
|
||||
)
|
||||
@@ -153,7 +149,6 @@ async def prepare_and_create_voice_design(
|
||||
user_id=current_user.id,
|
||||
name=data.name,
|
||||
instruct=data.instruct,
|
||||
backend_type="local",
|
||||
meta_data=data.meta_data,
|
||||
preview_text=data.preview_text,
|
||||
voice_cache_id=cache_id,
|
||||
@@ -200,12 +195,6 @@ async def prepare_voice_clone_prompt(
|
||||
if not design:
|
||||
raise HTTPException(status_code=404, detail="Voice design not found")
|
||||
|
||||
if design.backend_type != "local":
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="Voice clone prompt preparation is only supported for local backend"
|
||||
)
|
||||
|
||||
if not can_user_use_local_model(current_user):
|
||||
raise HTTPException(
|
||||
status_code=403,
|
||||
|
||||
Reference in New Issue
Block a user