AIMGNN is a full-stack AI-powered music generation platform built with a vanilla JavaScript frontend and a Python FastAPI backend leveraging Meta's MusicGen model. Users can generate high-quality music by entering text prompts or uploading melody seeds, preview results in-browser, and download compositions.
- Features
- Repository Structure
- Prerequisites
- Installation & Setup
- Usage
- API Endpoints
- Samples
- Citations
- Acknowledgments
- Contributors
- Made By
- 🎵 Text-to-Music Generation – Generate music from text prompts using advanced AI algorithms.
- 🎛️ Customizable Music – Edit and fine-tune generated music with prompt-based customization.
- 💾 Download & Share – Download your music in high-quality formats and share it with the world.
- ⚙️ Advanced Controls – Fine-tune tempo, pitch, and other parameters.
AIMGNN/
├── css/ # Stylesheets
├── gifs/ # Animated assets
├── images/ # Static images
├── js/ # JavaScript modules
├── music/ # Audio output files
├── musicgen/ # Python backend with MusicGen
├── *.html # Frontend HTML pages
├── README.md # This file
├── requirements.txt # Backend dependencies
└── account.html, dashboard.html, ...
- Python 3.8+
- Git
- A modern browser (Chrome, Firefox, etc.)
# Clone repository
git clone https://github.com/OmarAsh-Dev/AIMGNN.git
cd AIMGNN
# Setup virtual environment
python3 -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install dependencies
pip install -r requirements.txt
pip install transformers audiocraftStart server_g.py using uvicorn
better run it on a platform like Lightning Ai and use Api builder for hosting it# Serve frontend
python -m http.server 3000
# Open http://localhost:3000/index.html in your browser- Open
generate.html. - Enter a text prompt.
- Optionally upload a melody seed (
.wavor.mp3). - Click Generate.
- Preview or download the result.
- 💡 Generate music with text or melody input.
- 🧪 Customize tempo, pitch, and duration.
- 💾 Download and 🎧 share your creation.
-
POST /predictprompt(string)duration(int, seconds)
-
POST /interpolationprompt(string)melody(file: .wav/.midi)duration(int, seconds)
🎧 Example compositions generated using AIMGNN:
Please cite Meta's original research:
@inproceedings{copet2023musicgen,
title = {Simple and Controllable Music Generation},
author = {Copet, Jade and Kreuk, Felix and Gat, Itai and Remez, Tal and Kant, David and Synnaeve, Gabriel and Adi, Yossi and Défossez, Alexandre},
booktitle = {Proc. of the 40th International Conference on Machine Learning},
year = {2023},
note = {arXiv:2306.05284}
}@misc{defossez2022encodec,
title={EnCodec: Efficient Neural Audio Compression},
author={Défossez, Alexandre and Zeghidour, Neil and Usunier, Nicolas and Bottou, Léon and Synnaeve, Gabriel},
year={2022},
eprint={2211.02231},
archivePrefix={arXiv},
primaryClass={cs.CV}
}- MusicGen by Meta AI
- Meta for open-sourcing cutting-edge research
- Early testers and community contributors
Want to contribute? Open a PR or issue!
| GitHub Username | Full Name |
|---|---|
| @OmarAsh-Dev | Omar Ahmed Shawqi |
| @Ahmed47Sameh | Ahmed Sameh Saad |
| @MOHAMEDRAGEB2020 | Mohamed Ali Ragab |
| @Abo4samra | Ahmed Samir Mahmod |
| @pro-mohamed | Mohamed Abd El-mohsen |
| @ahmedhunter25 | Ahmed Kamal |
| @MohamedAttya74 | Mohamed Attya |
