/** * Music generation via Google Vertex AI Lyria (predict endpoint). * * VERIFIED LIVE against `lyria-002` (Lyria 2, GA) on 2026-06-01 — the request * body and response field below match the real API. INERT / unavailable * without a Vertex project (GOOGLE_CLOUD_PROJECT or VERTEX_PROJECT must be set). * * POST https://{REGION}-aiplatform.googleapis.com/v1/projects/{PROJECT}/ * locations/{REGION}/publishers/google/models/{MODEL}:predict * Authorization: Bearer * Body: { instances: [{ prompt: string }], parameters: { sampleCount: 1 } } * Response: { predictions: [{ bytesBase64Encoded: string (WAV), mimeType }] } * * MODEL (via LYRIA_MODEL env, default lyria-002): * - lyria-002 Lyria 2, GA, 30s, text-only ($0.06/30s) * - lyria-3-clip-preview Lyria 3, 30s, text+image (PREVIEW — needs project allowlist) * - lyria-3-pro-preview Lyria 3 Pro, ~184s full song, text+image (PREVIEW — allowlist) * NOTE: the Lyria 3 image-input (multimodal) request shape is NOT yet wired or * verified here — it needs preview allowlist access; add + verify once granted. * * Auth (tried in order): GOOGLE_ACCESS_TOKEN env -> GCE metadata server -> * `gcloud auth print-access-token` (local dev, dependency-free). For prod/CI, * set GOOGLE_ACCESS_TOKEN or run on a GCE/Cloud Run service account. * requiresVertex: true. */ import type { MusicBackend } from './types.js'; /** * True duration (ms) of a RIFF/WAVE buffer, read from its fmt byteRate + data * chunk size. Lyria returns a full WAV, so this reports the real clip length * (~32.8s for lyria-002) rather than the requested-duration default. Returns * null for a non-WAV / unparseable buffer (caller falls back to the request). */ export declare function wavDurationMs(buf: Buffer): number | null; export declare const lyriaBackend: MusicBackend; //# sourceMappingURL=native-lyria.d.ts.map