오늘의 응원가 자동 생성 파이프라인 (Suno)

- 경기 맥락(전날 결과·순위·연전 차수·선발투수) 조립 → LLM 작사
  (콜앤리스폰스·섹션 태그 형식) → Suno(sunoapi.org) 생성 → songs 테이블
- 워커: 킥오프 150분 전 윈도우 진입 시 생성 시작 + 2분 주기 폴링
- API: GET /api/songs/today · POST /api/songs/callback(싱크대)
  · POST /api/songs/generate(관리자 강제 생성)
- 프론트: MusicBar 가 경기 상세·메인에서 오늘의 응원가를 동적 로드
  (정적 플레이리스트는 폴백 유지)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
JinwooKimandClaude Fable 5 committed 2026-08-25 09:33:34 +09:00
1 parent 2a8f2bc1fa
commit 277378477a
11 files changed
+706 -7

No files matched your search

+12
View File
@@ -173,6 +173,18 @@ class Settings(BaseSettings):
football_refresh_hour: int = 0
football_refresh_minute: int = 0
# ── 외부 연동: Suno (sunoapi.org 서드파티 게이트웨이) ─────
# 오늘의 응원가 자동 생성. 키 미설정 시 전체 no-op.
suno_api_key: str = ""
suno_api_base: str = "https://api.sunoapi.org"
suno_model: str = "V5"
# 응원가 생성 전체 스위치 (KBO 만 대상 — 한국어 응원가)
songs_enabled: bool = True
# 킥오프 N분 전부터 생성 시작 (선발투수·라인업 확정 이후 시점)
song_generate_minutes_before: int = 150
# 생성 대상 점검·생성 상태 폴링 주기(초)
song_tick_seconds: int = 120
# ── 외부 연동: 이메일 ─────────────────────────────────────
# 1순위: Azure Communication Services(ACS) Email — endpoint + accesskey.
# AZURE_ACS_SENDER 는 검증된 MailFrom 주소(예: donotreply@triplepick.o2o.kr).