Custom AI songs sung in your own voice
Mermaid's Voice (mzstudio) — media.ifweb.kr
A paid service: up to three participants record four short prompts on their phones and describe the lyrics and mood; AI writes and composes the song and delivers a finished track sung in the participants' own voices by email. Ordering, generation, quality checks, delivery, payment and the sales ledger run without manual steps, and the web, API, recording storage and GPU generation all run on local models on a single Mac mini.
Research question
From about a minute of recordings, can we produce a song that sounds like the participant, stays in tune and has clearly intelligible lyrics — at a quality customers will pay for — without human review?
Approach
Never trust the generator's output as-is. Measure each participant's real range from the recordings, impose it on composition as rules, then transcribe the result to score lyric match and track pitch to catch range overruns, long high notes and sudden jumps; only passing takes go on to voice conversion. Each order runs through a three-stage queue (prep → GPU → post) so that once the single GPU is leased, queued jobs are processed back to back. Failures are classified (lyrics, recordings, system) so the customer can fix them or the worker retries automatically.
Repositories
| mzstudio / web | Next.js static site (Korean · English). Order form, four recordings with sing-along samples, checkout, progress and ETA, “My music” downloads and revisions, 30-second Shorts controls |
|---|---|
| mzstudio / api | FastAPI. Upload validation, orders, payments (Toss Payments) and webhooks, download tokens, sales ledger, VPN-only admin console |
| mzstudio / worker | Generation worker. Lyrics and song design, GPU leasing, composition, separation, checks, voice conversion, section assembly and mastering, score and Shorts rendering, delivery mail, retention cleanup |
| Shared engines | Shares ACE-Step · Seed-VC installs and GPU swapping with Baron (02), with per-user leases so neither unloads the other's job. Orders, customer data and DB are separate |
Key features
- Range from four recordings — read a sentence, hold a comfortable note, sing lightly, and glide like a siren from low to high. Range is measured only from sung prompts, because speech makes the range look lower and narrower and the song shrinks. The measured range (e.g. D3–A4) is shown right after recording; recordings that are too short or unsteady are retaken.
- One song, several singers — lyric sections are assigned to participants, and each person's converted vocal is joined with short crossfades at section boundaries; sections sung together are layered.
- Local-LLM lyrics and song design — writes lyrics from title, mood and genre, or polishes the customer's own. A small model (gemma-4) goes first, falling back to 27B. Nine song languages; tempo and length default to “auto” with only a few easy choices. Hip-hop and rap get their own length calculation from syllables per bar.
- Keeping notes in range — rules such as the participant's range, a one-octave span and no leaps beyond a fifth go to both the music model and the design LLM. The generated vocal's range is measured and shifted by octaves; if it still exceeds the range by more than five semitones, or holds long high notes or jumps 12 semitones, it is regenerated. Jumps are checked again after conversion.
- Lyric check — each take is transcribed with Whisper and compared with the ordered lyrics against a per-language threshold; spellings that sound alike are treated as equal. Word timings also drive the Shorts captions and the score.
- Deliverables — full track, instrumental, lyrics, and a lead sheet PDF with lyrics transcribed automatically from the AI guide vocal (LilyPond), via email links and “My music”.
- 30-second Shorts — picks a highlight by vocal presence and energy and renders a 9:16 video with line-by-line lyrics. Requires consent from every participant at order time and is uploaded to the official channel only after the orderer confirms the song; it can be withdrawn at any time.
- Revisions and retention — up to three revisions within 14 days of first delivery. Original recordings are stored encrypted and deleted on confirmation, when revisions run out or when the period ends; intermediate files are cleaned right after delivery.
- Fixable failures — lyric problems let the customer edit (or AI-polish) the lyrics and remake, recording problems allow a retake, and system problems are retried automatically twice after a few minutes.
- Payments and tax — Toss Payments in KRW and USD (international cards · PayPal). If the approval response is lost, the order stays “confirming” and the worker settles it by querying the provider. Webhook bodies are never trusted — state is re-fetched — with partial/full refunds and a ledger classified as taxable or zero-rated.
- Secure defaults — CSP and frame blocking, upload magic-byte checks and blocking of disguised playlists, order keys only in headers, admin console returns 404 outside the VPN range. Visitors from abroad land on the English UI.
- Sharing one GPU — when an order arrives the assistant's 27B is unloaded and the music engine leased; a lease processes all queued jobs, and prep runs at most two jobs ahead. Measured: about 7 minutes for a 64-second song with two singers, lyric match 0.975.
- Scaling with demand — additional LLM servers are planned as customer order volume grows. Job pickup and payment updates are serialized with database locks, so adding machines never produces the same order twice.