41 lines
952 B
Python
41 lines
952 B
Python
from dataclasses import dataclass
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
# Typecast 카탈로그 id. 롱컷 나레이션 보이스 정본이다.
|
|
TYPECAST_YENA = "tc_61e748d0fd9fb2d2cacbb04d"
|
|
|
|
|
|
class TypecastVoice(BaseModel):
|
|
"""Typecast(ssfm-v30) 설정. 주면 엔진이 typecast가 된다."""
|
|
voice_id: str = TYPECAST_YENA
|
|
emotion: str = "normal"
|
|
emotion_intensity: float = 1.0
|
|
tempo: float = 1.0 # OpenAI의 speed에 대응
|
|
|
|
|
|
class NarrationCue(BaseModel):
|
|
index: int
|
|
text: str
|
|
start: float
|
|
duration: float
|
|
end: float
|
|
pause_after: float
|
|
|
|
|
|
class NarrationTimeline(BaseModel):
|
|
"""씬·카메라 비트를 여기 큐에 맞춘다."""
|
|
engine: str
|
|
voice: str
|
|
lead_in: float
|
|
tail: float
|
|
total: float
|
|
cues: list[NarrationCue]
|
|
|
|
|
|
@dataclass
|
|
class NarrationAudio:
|
|
timeline: NarrationTimeline
|
|
mp3: bytes # 큐 위치에 얹어 합친 한 트랙
|