비디오 automated lyric 가사 (animated)추가

This commit is contained in:
jaehwang committed 2026-02-02 14:17:01 +09:00
1 parent 7a0d5a6272
commit 5700965fae
3 files changed
+77 -13

No files matched your search

+18 -11
View File
@@ -41,6 +41,8 @@ from app.video.schemas.video_schema import (
)
from app.video.worker.video_task import download_and_upload_video_to_blob
from config import creatomate_settings
logger = get_logger("video")
router = APIRouter(prefix="/video", tags=["Video"])
@@ -348,17 +350,22 @@ async def generate_video(
f"[generate_video] timestamp[{i}]: lyric_line={ts.lyric_line}, start_time={ts.start_time}, end_time={ts.end_time}"
)
text_template = creatomate_service.get_text_template()
for idx, aligned in enumerate(song_timestamp_list):
caption = creatomate_service.lining_lyric(
text_template,
idx,
aligned.lyric_line,
aligned.start_time,
aligned.end_time,
)
final_template["source"]["elements"].append(caption)
# LYRIC AUTO 결정부
if (creatomate_settings.DEBUG_AUTO_LYRIC):
auto_text_template = creatomate_service.get_auto_text_template()
final_template["source"]["elements"].append(creatomate_service.auto_lyric())
else :
text_template = creatomate_service.get_text_template()
for idx, aligned in enumerate(song_timestamp_list):
caption = creatomate_service.lining_lyric(
text_template,
idx,
aligned.lyric_line,
aligned.start_time,
aligned.end_time,
)
final_template["source"]["elements"].append(caption)
# END - LYRIC AUTO 결정부
# logger.debug(
# f"[generate_video] final_template: {json.dumps(final_template, indent=2, ensure_ascii=False)}"
# )