feat: Add emotion handling to audiobook segments with emo_text and emo_alpha attributes
This commit is contained in:
@@ -593,6 +593,8 @@ def create_audiobook_segment(
|
||||
text: str,
|
||||
chapter_index: int = 0,
|
||||
segment_index: int = 0,
|
||||
emo_text: Optional[str] = None,
|
||||
emo_alpha: Optional[float] = None,
|
||||
) -> AudiobookSegment:
|
||||
seg = AudiobookSegment(
|
||||
project_id=project_id,
|
||||
@@ -600,6 +602,8 @@ def create_audiobook_segment(
|
||||
text=text,
|
||||
chapter_index=chapter_index,
|
||||
segment_index=segment_index,
|
||||
emo_text=emo_text or None,
|
||||
emo_alpha=emo_alpha,
|
||||
status="pending",
|
||||
)
|
||||
db.add(seg)
|
||||
|
||||
Reference in New Issue
Block a user