All projects

Arts, Entertainment & Sports

MelodyCraft

AI music creation platform, from a prompt to a finished song

Built the music AI and lyrics layer, content safety and evaluation gates, and the GPU stem-separation and voice-conversion pipelines behind MelodyCraft, an AI music creation platform.

MelodyCraft: AI music creation, from a prompt to a finished song

1 / 5
MelodyCraft: AI music creation, from a prompt to a finished song

MelodyCraft: AI music creation, from a prompt to a finished song

45–90 s

Median time for a full song

98–99.5%

Generations that succeed

about $0.45

ElevenLabs cost per 3-minute song

about 2–3 dB

Better vocal SDR with RoFormer than Demucs

Stack

Next.js (Vercel)Python / FastAPITemporal CloudSupabaseOpenAI GPT-4.1ElevenLabs MusicPyMSS (RoFormer) / DemucsSeed-VCModal GPUFFmpegCloudflare R2Stripe Billing

Overview

MelodyCraft is an AI music creation platform for creators, marketers and independent musicians who want personalized music without a DAW or a recording studio. Users describe a song, bring their own lyrics or turn a story into music, and each request becomes a section-by-section composition plan generated by ElevenLabs Music.

The problem

Turning music production into a guided AI workflow means coordinating long-running AI and media operations while keeping the product responsive, reliable and cost-efficient.

  • Several model families: language understanding, music generation, separation and voice conversion each need different models.
  • Expensive GPU work: separation and voice conversion need GPUs that should not run when idle.
  • Rights and consent: uploads, covers and voice models need copyright checks and verified consent.

My role

I worked on MelodyCraft as an AI engineer and built the AI side of its web platform: the music AI and lyrics layer, its content safety and evaluation gates, and the stem-separation and voice-conversion pipelines on Modal GPUs. The MelodyCraft iOS app is a separate product that I did not build. The MelodyCraft team ran the listening panels, labeled the evaluation data and licensed the test audio.

What I built

Music AI and lyrics

  • The SongSpec and the GPT layer that turns prompts, stories and lyrics into it, with gpt-4.1-mini Structured Outputs for prompt interpretation and gpt-4.1 for stories and lyrics.
  • The ElevenLabs Music integration: composition plans for new songs, and inpainting plans that keep unchanged sections, so the Song Editor regenerates only the edited section and the Song Extender adds new sections around the original.

Content safety and evaluation

  • Content safety: omni-moderation-latest on prompts and lyrics, an artist-imitation rewrite into neutral attributes, and ACRCloud fingerprint checks on uploads.
  • An eval harness and release gates for prompts, models and checkpoints, with Fréchet Audio Distance, CLAP alignment and separation quality, sliced by genre and language.

Audio and voice on GPUs

  • Modal GPU functions for stem separation: a RoFormer vocal model as primary separator, with Demucs as fallback and regression baseline.
  • Seed-VC cover flows, zero-shot by default, with opt-in per-artist models fine-tuned only from consented recordings.
  • Reattachment to running GPU work: Modal call IDs go into Temporal activity heartbeats, so a restarted worker reattaches instead of paying twice.

Results

  • Generation time: a full song in 45–90 seconds at the median, with a P95 of 2–3 minutes.
  • Generation success: 98–99.5% of generations succeed.
  • Music cost: about $0.45 in ElevenLabs cost per 3-minute song.
  • GPU cost: about $0.01–0.03 per cover on Modal.
  • Separation quality: RoFormer separation about 2–3 dB SDR better than Demucs on vocals.

Tech stack

LayerTechnologies
FrontendNext.js (App Router), React, TypeScript, Tailwind CSS, shadcn/ui, TanStack Query, WaveSurfer.js
BackendPython, FastAPI, Pydantic, SQLAlchemy, Alembic, Temporal Cloud, Redis
AIOpenAI gpt-4.1, gpt-4.1-mini and omni-moderation-latest, ElevenLabs Music music_v1, PyMSS (RoFormer), Demucs, Seed-VC
AudioFFmpeg, Essentia, librosa, pyloudnorm, ACRCloud
Data and billingSupabase (PostgreSQL, Auth, Storage), Cloudflare R2, Stripe Billing
InfrastructureVercel, AWS ECS Fargate, Modal GPU (L4, A100), Cloudflare CDN and Workers, Terraform, GitHub Actions
MonitoringOpenTelemetry, Grafana Cloud, Sentry, PostHog

Related case studies