An AI-driven music creation toolkit that combines lyrics, beats, and cover art generation into a single workflow. Itβs not meant to replace musicians β just to give you something weird, fast, and occasionally impressive without opening GarageBand.
- π΅ AI Music Generation with ACE-Step
- π§ LLM-Powered Lyric & Prompt Generation with Qwen2-7B
- πΌοΈ AI Thumbnail Generation with stabilityai/sdxl-turbo
- π€ Multiple generation modes: descriptions, custom lyrics, or described lyrics
- πΈ Instrumental Tracks for music without vocals
- β‘ Serverless GPU Processing with Modal for blazing-fast generation
- π Queue System powered by Inngest for background task handling
- π³ Credit-Based System with Polar.sh for seamless pack purchases
- π€ User Authentication via BetterAuth
- π§ Community Music Feed to explore, play, and like AI-generated songs
- ποΈ Personal Track Dashboard to manage, publish, and showcase your music
- π Python & FastAPI Backend driving the music logic
- π± Next.js, Tailwind & Shadcn UI Frontend for a clean, modern experience
π Backend:
- π Python 3.12
- β‘ FastAPI
- βοΈ Modal (serverless GPU execution)
- π Inngest (event-driven queues)
- π¦ AWS S3 (file storage)
π» Frontend:
- βοΈ Next.js 14
- π¨ Tailwind CSS
- πΌοΈ Shadcn UI
- π BetterAuth (authentication)
- π³ Polar.sh (credit packs & payments)
π€ AI Models:
- π΅ ACE-Step (music generation)
- π§ Qwen2-7B (lyrics & prompts)
- πΌοΈ stabilityai/sdxl-turbo (thumbnails)
git clone --recurse-submodules https://github.com/BernieTv/AI-Music-Generator.git
cd backend
pip install -r requirements.txt
modal setup
modal run main.py
modal deploy main.py
β οΈ Note: All backend environment variables (AWS keys, S3 bucket name, etc.) should be configured in the Modal Secrets tab, not in a local.env
file.
cd frontend
npm i
npm run dev
cd frontend
npx inngest-cli@latest dev
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject"],
"Resource": "arn:aws:s3:::music-generation-bucket/*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::music-generation-bucket"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::music-generation-bucket/*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::music-generation-bucket"
}
]
}
AWS_ACCESS_KEY_ID=""
AWS_REGION=""
AWS_SECRET_ACCESS_KEY=""
S3_BUCKET_NAME=""
DATABASE_URL=""
BETTER_AUTH_SECRET=""
MODAL_KEY=""
MODAL_SECRET=""
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY_ID=""
AWS_REGION=""
S3_BUCKET_NAME=""
GENERATE_FROM_DESCRIPTION=""
GENERATE_FROM_DESCRIBED_LYRICS=""
GENERATE_WITH_LYRICS=""
POLAR_ACCESS_TOKEN=""
POLAR_WEBHOOK_SECRET=""
This project is a playful experiment that blends music and AI. It wonβt replace your favorite artist, but itβs a fun way to turn prompts into beats, lyrics, and cover art. Sometimes the results are surprisingly good, sometimes theyβre quirky β but thatβs part of the charm. Ideal for tinkering, learning, or just seeing what AI comes up with when asked to make music.