DEV Community

Cover image for Show DEV: I Built an AI Rap Generator that Creates Full Songs (Not Just Lyrics)
chou cairne
chou cairne

Posted on

Show DEV: I Built an AI Rap Generator that Creates Full Songs (Not Just Lyrics)

For the past few months, I've been working as a solo developer on a project I'm incredibly passionate about, and I'm finally ready (and nervous!) to share it.

The project is RapGenerator AI: https://www.rapgeneratorai.com

The Problem
I was getting frustrated with the "AI Rap" tools out there. Almost all of them are just "Lyric Generators." They give you a block of text, and that's it.

As a user, I felt cheated. I wanted the full experience. I wanted to hear the song.

The Solution: A Full Song Generator
So, I decided to build a tool that handles the entire process. You give it a simple text prompt (like "a rap song about my cat"), and in about 60 seconds, it generates a complete, original rap song—including:

AI-generated Lyrics (with hooks and verses)

AI-generated Vocals (with a realistic flow)

A high-quality Beat

Final Mixing

The Tech Stack (The Fun Part)
For my fellow devs, here's a look under the hood. The project is built on a Next.js 14 (App Router) stack.

Frontend: Next.js, Tailwind CSS, Radix UI

Backend: Next.js API Routes

Auth & Payments: My SaaS boilerplate already had Better Auth & Creem integrated.

Database: PostgreSQL with Drizzle ORM

The "AI Magic" is a 3-part chain:

Lyrics: I use a large language model (LLM like GPT-4o or Claude 3) with a very specific, multi-step prompt. This forces the AI to output a consistent structure ([Hook], [Verse 1], [Hook]) and maintain rhymes.

Vocals: This was the hardest part. I'm using a specialized Singing Voice Synthesis (SVS) API (like ElevenLabs). This isn't just a simple TTS. It takes the text, a voice ID, and parameters for rhythm and emotion to generate a surprisingly good acapella (vocal-only) track.

Mixing: The backend then takes the generated acapella, grabs one of the royalty-free beats from its library (matching the BPM!), and uses FFMPEG on the server to mix them into the final MP3 that the user hears.

The Ask
This is still an MVP, and I'd be incredibly grateful for this community's feedback. There's a free plan, so you can try it out right now without signing up.

Let me know what you think!

Top comments (0)