AI-Powered Ableton Live Assistant with Voice & RAG
An intelligent assistant that answers questions about Ableton Live using Retrieval-Augmented Generation (RAG) with voice input/output capabilities and specialized music production tools.
- RAG-Powered Knowledge Base - Searches through Ableton Live manuals and curated YouTube tutorials with timestamp references
- Intelligent Agent - Automatically falls back to web search (DuckDuckGo) when local knowledge is insufficient
- Streaming Responses - Real-time typing effect with Server-Sent Events (SSE)
- Voice Interaction - Speech-to-text input and text-to-speech output for hands-free operation
- Music Production Tools - Built-in tempo calculator (BPM β ms) and pitch converter (MIDI β Hz)
- Multilingual Support - Works in English, Spanish and Catalan
- Session Memory - Maintains conversation context across interactions
- Modern UI - Dark theme with Ableton-inspired yellow accents
You: How do I quantize audio clips in Ableton?
Chatbleton: To quantize audio clips in Ableton Live, you need to...
[Detailed answer with timestamps]
Sources:
β’ https://youtube.com/watch?v=xxx&t=120s [2m0s]
β’ Ableton Live Manual - Chapter 10
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React 19) β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββββββββ β
β β Chat β β Voice β β TTS β β Markdown β β
β β Input β β Record β β Output β β + Sources β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ βββββββββ¬βββββββββ β
βββββββββΌββββββββββββββΌββββββββββββββΌβββββββββββββββββΌββββββββββββ
β β β β
βΌ βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend (Flask + LangChain) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β LangChain Agent β β
β β βββββββββββββββ βββββββββββββββ ββββββββββββββββββββ β β
β β β RAG Tool β β Web Search β β Music Tools β β β
β β β (ChromaDB) β β (DuckDuckGo)β β (Tempo/Pitch) β β β
β β ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββββ¬ββββββββββ β β
β βββββββββββΌβββββββββββββββββΌβββββββββββββββββββΌβββββββββββββ β
β βΌ βΌ βΌ β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββ β
β β E5 Embeddingsβ β OpenAI β β OpenAI Whisper β β
β β (Multilingual)β β GPT-4o β β STT / TTS β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite 7, react-markdown, remark-gfm |
| Backend | Python 3.10+, Flask 3.x, LangChain 1.2+ |
| LLM | OpenAI GPT-4o-mini |
| Embeddings | intfloat/multilingual-e5-base (HuggingFace) |
| Vector Store | ChromaDB (local, persistent) |
| Voice | OpenAI Whisper (STT), OpenAI TTS |
| Web Search | DuckDuckGo (ddgs) - fallback when RAG fails |
Before you begin, ensure you have:
- Python 3.10+ installed
- Node.js 18+ installed
- OpenAI API key (Get one here)
- ~4GB RAM for embedding model
git clone https://github.com/yourusername/chatbleton.git
cd chatbleton# Copy the example file
cp .env.example .env
# Edit .env and add your OpenAI API key
# Required: OPENAI_API_KEY=sk-your-key-here# Create virtual environment
python -m venv .venv
# Activate it
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activatepip install -r requirements.txtNote: First run will download the E5 embedding model (~400MB)
python build_index.py --rebuildThis creates the ChromaDB vector store from:
data/manual_chunks/- Ableton Live manual (pre-chunked)data/transcripts/- YouTube tutorial transcripts with timestamps
cd frontend
npm install
npm run build
cd ..python app.pyOpen http://localhost:8000 in your browser.
chatbleton/
βββ app.py # Flask server, API endpoints, security
βββ agent_tools.py # LangChain agent with 4 tools
βββ rag.py # RAG chain (retrieval + generation)
βββ embeddings.py # E5 multilingual embeddings wrapper
βββ build_index.py # Script to build ChromaDB index
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ Dockerfile # Production container
βββ docker-compose.yml # Container orchestration
β
βββ frontend/
β βββ src/
β β βββ App.jsx # Main React component
β β βββ app.css # Dark theme styles
β βββ package.json # Node dependencies
β βββ vite.config.js # Vite configuration
β
βββ data/
β βββ manual_chunks/ # Ableton manual (JSON, pre-processed)
β βββ transcripts/ # YouTube transcripts (JSON with timestamps)
β
βββ chroma_db/ # Vector database (generated by build_index.py)
| Endpoint | Method | Description |
|---|---|---|
GET /health |
GET | Health check & feature flags |
POST /chat |
POST | Send question, receive answer |
POST /stt |
POST | Speech-to-text (audio β text) |
POST /tts |
POST | Text-to-speech (text β audio) |
POST /reset_session |
POST | Clear conversation history |
curl -X POST http://localhost:8000/chat \
-H "Content-Type: application/json" \
-d '{
"question": "How do I sidechain compress in Ableton?",
"session_id": "user123"
}'Response:
{
"answer": "To set up sidechain compression in Ableton Live...\n\nSources:\nβ’ https://youtube.com/watch?v=xxx&t=45s [0m45s]"
}curl -X POST http://localhost:8000/chat \
-H "Content-Type: application/json" \
-d '{
"question": "What is MIDI?",
"session_id": "user123",
"stream": true
}'Response (Server-Sent Events):
data: {"token": "MIDI"}
data: {"token": " sta"}
data: {"token": "nds "}
data: {"token": "for "}
...
data: {"done": true}
The LangChain agent has access to 4 specialized tools:
| Tool | Purpose | When Used |
|---|---|---|
ask_rag_strict |
Query ChromaDB knowledge base | First attempt for any question |
web_search |
DuckDuckGo web search | When RAG returns NO_CONTEXT |
tempo_calculator |
BPM β milliseconds conversion | "What's 128 BPM in ms?" |
pitch_converter |
MIDI β Hz conversion | "What frequency is C4?" |
| Feature | Description |
|---|---|
| Rate Limiting | 30 requests/minute per IP (configurable) |
| Input Sanitization | Strips control characters, limits length |
| File Size Limits | Max 10MB for audio uploads |
| Security Headers | X-Frame-Options, X-Content-Type-Options, etc. |
| Error Handling | No stack traces exposed in production |
All settings are configured via environment variables. See .env.example for the full list.
| Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY |
required | Your OpenAI API key |
OPENAI_MODEL |
gpt-4o-mini |
Chat model |
PORT |
8000 |
Server port |
DEBUG |
false |
Enable debug logging |
RATE_LIMIT_PER_MINUTE |
30 |
Max requests per IP |
MAX_QUESTION_LENGTH |
2000 |
Max characters per question |
# Build and run
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose down# Run backend with debug mode
DEBUG=true python app.py
# Run frontend with hot reload (separate terminal)
cd frontend
npm run devFrontend dev server runs on http://localhost:5173 with API proxy to backend.
The knowledge base includes:
- Ableton Live Manual - Official documentation, chunked for retrieval
- YouTube Tutorials - Curated video transcripts with timestamps:
- Workflow tips
- Sound design techniques
- Mixing & mastering guides
- Requires OpenAI API key (paid)
- Knowledge base is static (manual + pre-indexed videos)
- Voice features require microphone permissions
- No user authentication (single-user design)
- User authentication
- Custom knowledge base upload
- Fine-tuned embedding model
- Hybrid search (BM25 + dense vectors)
MIT License - feel free to use for learning and personal projects.
- Ableton for creating an amazing DAW
- LangChain for the agent framework
- OpenAI for GPT and Whisper APIs
- ChromaDB for the vector store
Built with passion for music production and AI