번역오류 수정 및 CTA적용

This commit is contained in:
skkim committed 2026-07-21 13:56:40 +09:00
commit 788e76ef76
8 files changed
+216 -37

No files matched your search

+6 -6
View File
@@ -113,11 +113,11 @@ class SunoService:
Args:
prompt: 가사 (customMode=true일 때 가사로 사용)
1분 이내 길이의 노래에 적합한 가사여야 함
40초 이내 길이의 노래에 적합한 가사여야 함
genre: 음악 장르 (예: "K-Pop", "Pop", "R&B", "Hip-Hop", "Ballad", "EDM", "Rock", "Jazz")
None일 경우 style 파라미터를 전송하지 않음
callback_url: 생성 완료 시 알림 받을 URL (None일 경우 config에서 기본값 사용)
instrumental: True이면 BGM 전용 — 더미 가사로 60초 길이를 유도하고 보컬 없이 생성
instrumental: True이면 BGM 전용 — 더미 가사로 40초 길이를 유도하고 보컬 없이 생성
Returns:
task_id: 작업 추적용 ID
@@ -125,7 +125,7 @@ class SunoService:
Note:
- 스트림 URL: 30-40초 내 생성
- 다운로드 URL: 2-3분 내 생성
- 생성되는 노래는 약 1분 이내의 길이
- 생성되는 노래는 약 40초 이내의 길이
"""
actual_callback_url = callback_url or apikey_settings.SUNO_CALLBACK_URL
@@ -133,11 +133,11 @@ class SunoService:
if instrumental:
bgm_lyrics = get_bgm_lyrics(genre)
formatted_prompt = f"[Song Duration: Around 1 minute - Must be around 60 seconds]\n{bgm_lyrics}"
formatted_prompt = f"[Song Duration: Around 40 seconds]\n{bgm_lyrics}"
logger.info(f"[Suno] BGM 더미 가사 장르 {normalized_genre} 선택됨")
else:
formatted_prompt = (
f"[Song Duration: Around 1 minute - Must be around 60 seconds]\n{prompt}"
f"[Song Duration: Around 40 seconds]\n{prompt}"
)
payload: dict[str, Any] = {
@@ -148,7 +148,7 @@ class SunoService:
"callBackUrl": actual_callback_url,
}
if normalized_genre:
payload["style"] = f"{normalized_genre}, around 60 seconds" if instrumental else normalized_genre
payload["style"] = f"{normalized_genre}, around 40 seconds" if instrumental else normalized_genre
last_error: Exception | None = None