feat: Integrate IndexTTS2 model and update related schemas and frontend components

This commit is contained in:
2026-03-12 13:30:53 +08:00
parent e5b5a16364
commit 8aec4f6f44
151 changed files with 40077 additions and 85 deletions

View File

@@ -564,6 +564,7 @@ def update_audiobook_character(
description: Optional[str] = None,
instruct: Optional[str] = None,
voice_design_id: Optional[int] = None,
use_indextts2: Optional[bool] = None,
) -> Optional[AudiobookCharacter]:
char = db.query(AudiobookCharacter).filter(AudiobookCharacter.id == char_id).first()
if not char:
@@ -578,6 +579,8 @@ def update_audiobook_character(
char.instruct = instruct
if voice_design_id is not None:
char.voice_design_id = voice_design_id
if use_indextts2 is not None:
char.use_indextts2 = use_indextts2
db.commit()
db.refresh(char)
return char

View File

@@ -173,6 +173,7 @@ class AudiobookCharacter(Base):
description = Column(Text, nullable=True)
instruct = Column(Text, nullable=True)
voice_design_id = Column(Integer, ForeignKey("voice_designs.id"), nullable=True)
use_indextts2 = Column(Boolean, default=False, nullable=False)
project = relationship("AudiobookProject", back_populates="characters")
voice_design = relationship("VoiceDesign")