feat: [rd] AI 배경음악 생성 기능 추가 (Google Lyria RealTime)

- Lyria RealTime WebSocket 연동으로 다중 악기 배경음악 실시간 생성
- BPM, 밀도, 밝기, 스케일 컨트롤 지원
- 시퀀서 + 음성 + 배경음악 3중 합성 (playAll, exportWav)
- 서버 API 키 보호 엔드포인트 (lyria-config)
- 빠른 프롬프트 10종 제공
This commit is contained in:
김보곤
2026-03-08 13:37:25 +09:00
parent d02c142f65
commit f8a00c3f8c
3 changed files with 435 additions and 2 deletions

View File

@@ -341,6 +341,25 @@ public function soundLogo(Request $request): View|\Illuminate\Http\Response
return view('rd.sound-logo.index');
}
/**
* Lyria RealTime 접속용 API 설정 반환
*/
public function soundLogoLyriaConfig(): JsonResponse
{
$apiKey = config('services.gemini.api_key');
if (! $apiKey) {
return response()->json(['success' => false, 'error' => 'API 키가 설정되지 않았습니다.'], 500);
}
return response()->json([
'success' => true,
'api_key' => $apiKey,
'ws_url' => 'wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1alpha.GenerativeService.BidiGenerateMusic',
'model' => 'models/lyria-realtime-exp',
]);
}
/**
* 사운드 로고 AI 생성 (Gemini API)
*/