"A sonic architecture for the modern web β where every byte of audio flows with precision."
Melodius Core is a distributed music playback orchestration system built for Discord communities that demand reliability, speed, and intelligence. Inspired by the foundation of Lavalink and discord.js v14, this repository reimagines audio delivery as a fault-tolerant, multi-source engine with real-time analytics, multilingual voice interfaces, and adaptive streaming quality.
This is not just a music bot base β it's a resilient audio grid designed for enterprise-grade community servers, live events, and automated radio stations.
- Why Melodius Core?
- Key Features
- System Architecture (Mermaid Diagram)
- Prerequisites & Compatibility
- Example Profile Configuration
- Example Console Invocation
- Emoji OS Compatibility Table
- OpenAI & Claude API Integration
- Multilingual Support & Responsive UI
- 24/7 Customer Support & Disclaimer
- SEO-Friendly Keyword Integration
- License
Most audio bots break under load, struggle with regional latency, or require manual intervention when a node fails. Melodius Core is designed as a self-healing meshed network of audio processors. Think of it as a swarm of tiny orchestrators β each one capable of taking over the other's workload without missing a beat.
Whether you're running a 10,000-member gaming server or a live podcast channel, this system scales horizontally and vertically, adapting to your infrastructure with zero downtime.
- Distributed Audio Architecture β Multiple Lavalink nodes managed automatically with failover routing. If one node goes silent, traffic shifts within milliseconds.
- Adaptive Streaming Quality β Dynamically adjusts bitrate based on network conditions, region, and server load. No more audio stutter during raid events.
- Real-Time Playlist Intelligence β Integrates with OpenAI and Claude APIs for natural language song requests. Say "play something upbeat from the 80s" and get instant results.
- Responsive Command UI β Slash commands, modals, and buttons designed for mobile Discord. Works flawlessly on tablets and phones.
- Multilingual Voice Engine β Supports 12 languages natively for both text commands and TTS responses. Perfect for international communities.
- Zero-Downtime Update System β Hot-reload your command modules without restarting the bot. Updates go live instantly.
- 24/7 Customer Support β Embedded health check endpoints and automated recovery scripts. The system phones home if something breaks.
- Audit Logging & Analytics β Every track, every command, every error logged with timestamp and correlation ID. Debugging becomes archaeology.
graph TD
A[Discord Gateway] --> B[Melodius Core - Dispatcher]
B --> C{Node Health Check}
C -->|Healthy| D[Lavalink Node 1 - US East]
C -->|Healthy| E[Lavalink Node 2 - EU West]
C -->|Healthy| F[Lavalink Node 3 - Asia Pacific]
C -->|Degraded| G[Failover Router]
G --> H[Backup Node Pool]
D --> I[Audio Stream]
E --> I
F --> I
I --> J[Voice Connection]
J --> K[Guild Member]
B --> L[Analytics Engine]
L --> M[Prometheus + Grafana]
B --> N[OpenAI / Claude Plugin]
N --> O[Natural Language Parser]
O --> P[Playlist Generation]
P --> D
This architecture ensures that no single node is a single point of failure. The dispatcher continuously pings each Lavalink instance, rerouting traffic within 200ms of a detected anomaly.
- Node.js v18+ (recommended v20 LTS)
- Java 17+ (for Lavalink server instances)
- Discord.js v14.x
- Redis 7.x (for session caching and queue persistence)
- FFmpeg (for audio transcoding fallback)
Below is a sample config.js file structure. Customize it to match your deployment environment.
module.exports = {
token: process.env.DISCORD_TOKEN,
clientId: '123456789012345678',
guildId: '987654321098765432',
lavalink: {
nodes: [
{ host: 'us-east.lavalink.internal', port: 2333, password: 'youshallnotpass', secure: false },
{ host: 'eu-west.lavalink.internal', port: 2333, password: 'youshallnotpass', secure: false },
{ host: 'apac.lavalink.internal', port: 2333, password: 'youshallnotpass', secure: true }
],
autoResume: true,
reconnectTries: 5,
reconnectInterval: 3000
},
plugins: {
openai: {
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-4o',
temperature: 0.7
},
claude: {
apiKey: process.env.CLAUDE_API_KEY,
model: 'claude-3-opus-20240229',
maxTokens: 1024
}
},
localization: {
defaultLang: 'en',
fallbackLang: 'en',
supportedLangs: ['en', 'es', 'fr', 'de', 'ja', 'ko', 'pt', 'ru', 'zh', 'it', 'nl', 'pl']
},
analytics: {
enabled: true,
endpoint: 'http://metrics.internal:9090',
interval: 10000
}
};Once configured, launch Melodius Core with:
node index.js --profile production --log-level verbose --metricsExample output:
[2026-04-08 14:32:11] π’ Melodius Core v3.2.1 initialized
[2026-04-08 14:32:11] π Connecting to Discord Gateway...
[2026-04-08 14:32:12] β
Gateway ready | Shard 0/3 active
[2026-04-08 14:32:13] π΅ Lavalink Node us-east: ONLINE (latency 34ms)
[2026-04-08 14:32:13] π΅ Lavalink Node eu-west: ONLINE (latency 28ms)
[2026-04-08 14:32:14] π Redis cache: CONNECTED | Keyspace 1247
[2026-04-08 14:32:15] π€ OpenAI plugin: ACTIVE | Model gpt-4o
[2026-04-08 14:32:15] π§ Claude plugin: STANDBY | Awaiting fallback trigger
[2026-04-08 14:32:16] π Analytics endpoint: http://metrics.internal:9090
| Operating System | Status | Emoji |
|---|---|---|
| Windows 11 (x64) | β Fully supported | πͺ |
| macOS Sonoma+ | β Fully supported | π |
| Ubuntu 22.04+ LTS | β Fully supported | π§ |
| Debian 12 | β Fully supported | π§ |
| CentOS 9 Stream | π§ | |
| Alpine Linux (Docker) | β Fully supported (minimal image) | π³ |
| FreeBSD 14 | π‘ Community tested, no official support | π‘ |
| Raspberry Pi OS (ARM64) | β Supported (use lightweight nodes) | π |
| Arch Linux | β Supported (rolling release) | π |
Melodius Core features a dual-LLM plugin architecture. By default, the system uses OpenAI's GPT-4o for natural language song requests, but falls back to Claude 3 Opus if the primary API is rate-limited or offline.
- A user types
!play create a chill lofi playlist for studying - The input is sent to the OpenAI API for intent parsing
- OpenAI returns a structured JSON with tracks, genres, and mood
- Melodius Core queues the tracks and begins playback
- If OpenAI returns a 429 error, the request is forwarded to Claude API
- Claude processes the same input and returns an equivalent playlist
This dual-redundancy ensures that your community never experiences a silent moment due to API outages.
User Input: "Play something by artists similar to Daft Punk but with more vocals"
OpenAI Response: {
"tracks": ["Something About Us - Daft Punk", "Instant Crush - Julian Casablancas"],
"similarArtists": ["Justice", "Phoenix", "Breakbot"],
"mood":"upbeat electronic with vocal hooks"
}
Queue Result: β
12 tracks added | Estimated playtime: 48 minutes
Melodius Core speaks 12 languages natively β both in text and in voice. When a user types in German, the bot responds in German. When they request a playlist in Japanese, the TTS engine reads back the queue in Japanese.
- Command parsing uses
detect-languagenpm package - Responses fetch locale strings from Redis cache
- TTS uses per-language voice models via Lavalink's external audio source support
All slash commands and button interfaces are built with mobile-first responsive design. Buttons auto-resize for small screens, modals use constrained widths, and dropdowns collapse gracefully. No overflow, no truncation β just clean interaction.
- Health Endpoints:
/health,/ping,/metricsβ exposed on an internal port - Auto-Recovery: If the main process crashes, a systemd watchdog restarts it within 5 seconds
- Alerting: Webhook notifications to your support channel when node throughput drops below 80%
- Fallback Mode: If all Lavalink nodes fail, the bot enters standby mode and alerts administrators
Melodius Core is provided "as is" without warranty of any kind, express or implied. The developers are not responsible for any data loss, service interruption, or community dissatisfaction resulting from the use of this software. Always maintain backups of your configuration and queue state. By deploying this system, you agree to monitor your own infrastructure and assume all operational risks. The use of third-party APIs (OpenAI, Claude) is subject to their respective terms of service and rate limits. This software is intended for educational and community purposes. Do not use in violation of Discord's Terms of Service or applicable law.
This repository is optimized for discoverability around the following search terms:
- Discord audio distribution system
- Lavalink music bot alternative
- Multi-node audio failover engine
- Real-time playlist generation with AI
- Multilingual Discord voice bot
- Enterprise-grade music bot framework
- 2026 Discord bot without downtime
- OpenAI playlist creator Discord
- Claude API integration for bots
- Scalable music bot architecture
- Zero-downtime audio streaming bot
These keywords appear naturally throughout the documentation, ensuring that developers searching for robust audio solutions can find Melodius Core quickly.
This project is licensed under the MIT License. You are free to use, modify, and distribute this software, provided that the original copyright notice and permission notice are included in all copies or substantial portions of the software.
Ready to build your own resilient audio grid? Download Melodius Core today and transform your Discord server into a professional-grade music platform. No more dead air, no more manual restarts β just pure, uninterrupted sound.
Melodius Core β where silence becomes the exception, not the rule. π§