Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 MusicMaker AI

🔗 Explore the App

Click here to explore music-maker

Welcome to MusicMaker AI, a highly advanced, open-source AI music generation platform capable of generating massive, non-repetitive "Long Mixes" (up to 60 minutes) in extremely short processing times.

MusicMaker AI Interface

✨ Features

  • Auto-Regressive Audio Continuation: Generates infinite streams of audio by feeding previously generated segments back into the transformer model.
  • Hyper-Fast Macro-Looping: Uses a hybrid architecture to generate a beautiful, evolving 3-minute core track natively, and then mathematically crossfades and loops it to fulfill 20m, 40m, or 60m duration requests instantly.
  • Crossfade Stitching Engine: Eliminates "pops" and "clicks" at generation boundaries by utilizing an overlapping overlap-add crossfade matrix.
  • Browser-Ready PCM Export: Bypasses standard floating-point WAV issues by securely transcoding and saving audio natively as 16-bit PCM for universal web browser playback.
  • Asynchronous FastAPI Backend: GPU operations are queued and tracked natively via an async non-blocking task queue, avoiding HTTP timeouts for large tracks.

🏗️ Architecture Stack

Frontend (React & Vite)

  • Built with React, Vite, and Lucide Icons.
  • Features a stunning, dark-mode sleek UI, similar to professional streaming apps.
  • Connects seamlessly to the backend API.

Backend (Python & PyTorch)

  • Hosted on FastAPI.
  • Model: facebook/musicgen-small deployed via transformers.
  • Accelerated with PyTorch and CUDA for instant generation.

🚀 Quickstart: Local Development

1. Start the GPU Backend

Navigate to the backend folder and activate the virtual environment:

cd backend
python -m venv .venv
# Windows
.venv\Scripts\activate
# Mac/Linux
source .venv/bin/activate

pip install -r requirements.txt
uvicorn main:app --host 127.0.0.1 --port 8080 --log-level debug

2. Start the Frontend

In a separate terminal, run the React Vite application:

cd frontend
npm install
npm run dev

Visit http://localhost:5173 to start creating!


☁️ Deployment

Deploying the Frontend to Vercel

  1. Push this repository to GitHub.
  2. Go to Vercel and create a new project from your repository.
  3. In the Vercel project settings, set the root directory to frontend.
  4. Add the environment variable: VITE_API_URL = YOUR_RUNPOD_URL
  5. Click Deploy. Vercel will automatically build the Vite application.

Deploying the Backend to RunPod (Recommended GPU Cloud)

Since Vercel cannot host GPU-dependent applications, we highly recommend RunPod as the best, most cost-effective cloud GPU provider for this API. We have provided a complete Dockerfile that makes deploying to RunPod nearly instant.

  1. Create an account at RunPod.io.
  2. Go to Serverless > Templates and click New Template.
  3. Set the Container Image to use the Dockerfile from this repository (you can host the Docker image on DockerHub or GitHub Container Registry first).
  4. Set the Container Disk and Volume to at least 20 GB (to hold the PyTorch models).
  5. Set the HTTP Port to 8080.
  6. Go to Serverless > Endpoints and create a new endpoint using your new template. Select an RTX 3090 or RTX 4090 GPU (they cost ~$0.20/hr and will generate your audio instantly).
  7. Copy the generated RunPod Endpoint URL and set it as your VITE_API_URL in Vercel!

🛠️ Built By

A next-generation audio engineering tool built with modern AI and web frameworks.

About

An advanced, open-source AI music generation platform built on MusicGen and FastAPI. Features auto-regressive continuation, macro-looping, and mathematical crossfading to generate pristine 60-minute Long Mixes in under 5 minutes.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages