🎵 IAcine MusicGen | AI-Powered Music Generator From Prompt
📖 Introduction
IAcine MusicGen is a lightweight, AI-powered application that turns simple text prompts into original music. Built using OpenAI and Meta’s MusicGen model, this tool transforms creative ideas into audio — instantly and interactively. Whether you’re a musician, content creator, or AI enthusiast, this project shows how AI can be used to generate melodies from scratch. 🧠🎶
Accessible via a simple Streamlit interface, users can describe a musical idea (e.g., “calm lo-fi with rain”) and instantly receive an original track.
🚀 Features
✔️ Prompt-to-Music Generation – Describe a style, vibe, or mood, and get a custom audio track 🎤➡️🎼
✔️ Streamlit Web Interface – Clean and simple UI for interaction with the model
✔️ AI Prompt Engineering – Uses GPT to interpret user input into optimized music prompts
✔️ Duration Control – Choose between different durations (5s, 10s, 30s…)
✔️ Local Generation – All processing runs locally (ideal for testing and demos)
🏗️ Technologies
- 🐍 Python 3.12 – Backend logic and interface
- 🧠 OpenAI GPT-3.5 – For generating high-quality music prompts
- 🎵 Meta MusicGen – For transforming prompts into original audio
- 🌐 Streamlit – Fast UI development for interaction
- 🛡️ dotenv – Environment variable management (for API keys)
📦 Installation
1️⃣ Clone the Repository
git clone https://github.com/Yacine-Mekideche/music-gen-prompt.git
cd music-gen-prompt
2️⃣ Create a .env
File
OPENAI_API_KEY=your_openai_api_key_here
3️⃣ Set Up Your Environment
python -m venv venv
# Activate it:
venv\Scripts\activate # Windows
source venv/bin/activate # Mac/Linux
4️⃣ Install Dependencies
pip install -r requirements.txt
▶️ Running the App
Simply run:
streamlit run app.py
This will open the Streamlit interface in your browser. Enter a musical idea (e.g., “sad piano ballad with ambient background”) and enjoy the generated music 🎧
🎯 Demo
🧠 AI Architecture Overview
- Text Input → Interpreted by GPT into structured music prompt
- Prompt → Sent to MusicGen model for waveform generation
- Audio Output → Played back through Streamlit UI
📬 Contact Me
💡 Interested in AI + Creativity? Let’s connect!
📩 Business inquiries: contact@iacine.tech
#AI #MusicGen #PromptToMusic #Streamlit #Python #OpenAI #MetaAI #GenerativeAI #MusicAI #IAcineTech #CreativeAI #TextToMusic #ArtificialIntelligence