Slatron
The intelligent TV station manager with adaptive AI hosts and distributed playback for DIY hackable TV stations, radio, and digital signage.
Install / Use
/learn @JustinWoodring/SlatronREADME
Slatron allows you to manage content, schedule broadcasts, and control playback nodes across your network from a centralized, web-based dashboard. It features fully autonomous AI DJs that can introduce tracks, read news, and manage the vibe of your station.
🌟 Key Features
- Adaptive AI DJs: Create diverse AI personalities to host your station, with support for Google Gemini, Anthropic Claude, OpenAI, Ollama, and local LLMs (Orpheus).
- Dynamic Bumpers & Station Branding: Create professional station idents, transitions, and lower thirds using MLT templates with variable substitution. Upload custom bumper backgrounds or use built-in animated gradients.
- Spot Reels: Bundle images, short videos, and web pages into looping carousels — perfect for ad breaks, rotating promos, or digital signage playlists. Schedule them like any other content.
- Centralized Management: Manage multiple playback nodes (TVs, screens) from a single server.
- Flexible Scheduling: Drag-and-drop schedule grid with layered priorities and interrupt scheduling.
- Role-Based Access Control (RBAC): Secure your station with
Admin,Editor, andViewerroles. - Real-time Monitoring: Live status updates and screenshots from nodes.
- Scripting Engine: Use Rhai scripts for dynamic content loading, overlays, playback logic, and automated bumper injection.
- Resilient Playback: Local caching on nodes ensures playback continues even if the network goes down.
- Content Library: Organize video files and manage valid paths per node with YouTube playlist support.
🚀 Quick Start
VIDEO TUTORIALS:
Building For Yourself
0. Build Prerequisites
Required
- Rust (1.75+)
- Node.js (18+) - For building the UI
- SQLite - For the server database
Required on Playback Nodes
- MPV - Media player with IPC support
- yt-dlp - For YouTube content support (MPV integration)
Required on Playback Nodes for Web Capture (Spot Reels with web items, Linux only)
- Xvfb - Virtual framebuffer for headless rendering
- Chromium or Google Chrome - Headless browser for web page capture
- FFmpeg - For x11grab screen capture to video
Note: Web capture in spot reels is a Linux-only feature. It requires Xvfb for a virtual display, a Chromium-based browser in kiosk mode, and FFmpeg with x11grab support. This pipeline does not work on macOS or Windows nodes. Image and video spot reel items work on all platforms.
Required on Server (for Bumpers)
- MLT Framework (
meltcommand) - For rendering bumper templates - FFmpeg (
ffprobecommand) - For extracting video duration
Optional
- libort - Required only if building server with
ml-supportfeature for local Orpheus TTS - curl - For downloading remote bumper backs (usually pre-installed)
1. Setting up the Server (slatron-server)
The server manages the database, API, and serving the web interface. It will automatically initialize the database and run migrations on startup.
cd slatron-server
# 1. Setup Database Directory
mkdir -p data
# 2. Build & Run (Embedding the UI for ease of use)
# This requires `npm` to be in your path, as it builds the UI automatically.
cargo run --release --features embed-ui -- --generate-config > config.toml
# Edit config.toml if needed, then:
cargo run --release --features embed-ui
The server will start on http://0.0.0.0:8080 (or your configured port).
Default Login: admin / admin
2. Setting up a Node (slatron-node)
The node runs on the computer connected to the display (e.g., a Raspberry Pi or mini PC).
cd slatron-node
# 1. Generate a config template
cargo run --release -- --generate-config > config.toml
# 2. Edit config.toml
# - Set `server_url` to your server's WebSocket URL (e.g., ws://192.168.1.10:8080/ws)
# - You will need a `secret_key`. Log into the Web UI, go to "Nodes", create a node, and copy its secret.
# 3. Run the node
cargo run --release
Note: Ensure mpv and yt-dlp are installed and available in the system PATH. Slatron will launch and control MPV automatically.
Installing Node Dependencies (macOS):
brew install mpv yt-dlp
Installing Node Dependencies (Linux/Debian):
sudo apt install mpv yt-dlp
# For web capture in spot reels (optional, Linux only):
sudo apt install xvfb chromium ffmpeg
Installing Server Dependencies (macOS):
brew install mlt ffmpeg
Installing Server Dependencies (Linux/Debian):
sudo apt install ffmpeg mlt
⚙️ Configuration
Both components support CLI arguments for configuration management.
Command Line Interface
- Generate Template:
slatron-server --generate-config(Prints to stdout) - Specify File:
slatron-server --config my_config.toml - Default / Interactive: Looks for
config.tomlin the current directory. If not found and running in an interactive terminal, it will launch an Onboarding Wizard to help you generate one.
Server Configuration (server-config.toml)
[server]
host = "0.0.0.0"
port = 8080
# Optional: Path to serve UI files from.
# If omitted and compiled with `embed-ui`, it uses the internal zip.
# ui_path = "./static"
[server.https]
enabled = false
# cert_path = "/path/to/cert.pem"
# key_path = "/path/to/key.pem"
[database]
url = "sqlite://data/slatron.db"
[jwt]
secret = "CHANGE_THIS_IN_PRODUCTION"
expiration_hours = 24
Node Configuration (node-config.toml)
node_name = "Lobby Display"
server_url = "ws://localhost:8080/ws"
secret_key = "PASTE_SECRET_FROM_UI"
heartbeat_interval_secs = 5
mpv_socket_path = "/tmp/mpv-socket"
🎙️ AI DJs & Orpheus
Slatron features a dynamic AI DJ system that can "speak" between songs, introducing tracks, reading news, or just creating a vibe.
LLM Providers
You can configure different LLM providers for DJ personality:
- Google Gemini: High-quality cloud-based models
- Anthropic Claude: Claude 3.5 Sonnet and other Claude models
- OpenAI: GPT-4 and other OpenAI models
- Ollama: Local LLM server for privacy and cost savings
Voice Providers
You can configure different voice providers for DJ speech synthesis:
- Gemini TTS: High-quality cloud-based TTS from Google
- Orpheus (Local): Fully offline, local text-to-speech engine powered by specific LLM checkpoints
Setting up Orpheus (Local TTS)
"Orpheus" allows you to run a high-quality DJ voice entirely on your own hardware (no API costs).
- Install LM Studio: Download and install LM Studio.
- Download Model: Search for and download the
isaiahbjork/orpheus-3b-0.1-ftmodel. - Start Local Server:
- Load the model in LM Studio.
- Go to the "Local Server" tab.
- Start the server on port
1234(default).
- Configure Slatron:
- In the Slatron Dashboard, go to Settings > AI Providers.
- Add a new provider with type Orpheus.
- Set the Endpoint URL to:
http://127.0.0.1:1234/v1/completions. - Important: You must compile the server with the
ml-supportfeature enabled (cargo run --features ml-support) as Slatron handles the audio decoding (SNAC) locally. The server when compiled with this option embeds the rather sizeable model, but obviously for space concerns it can be compiled with local orpheus support for said reason.
Data & Configuration
Voice Name
The Voice Name field in the DJ Profile maps differently depending on the provider:
- Gemini TTS: Use standard model names (e.g.,
Aoede,Charon,Fenrir,Puck,Zephyr). - Orpheus: Use the specific character name supported by the model (e.g.,
tarafor the default fine-tune).
Context Injector Scripts
DJs can be made "aware" of their environment using Context Scripts. These are server-side Rhai scripts that run before the prompt is sent to the LLM.
- Logic: The script can fetch data (weather, stock prices, internal server state) and must return a String.
- Injection: The returned string is appended to the "Context" block in the system prompt.
- Example Script:
// Get weather for station location let weather = http_get("generic.weatherapi.com/NY"); context += "Current weather in NY is " + weather + ". Mention it if relevant.";
Content Loader Scripts
You can also use Rhai scripts to bulk import content (e.g., from YouTube playlists or RSS feeds).
- Location: "Configuration > Scripts". Create a script of type
Content Loader. - Usage: In "Content > Add Content", switch to "Import via Script".
- Return Format: The script must return a JSON Object (for one item) or a JSON List (for bulk import).
[ { "title": "Video 1", "url": "https://...", "duration_minutes": 5 }, { "title": "Video 2", "url": "https://...", "duration_minutes": 10 } ]
🎨 Bumpers & Station Branding
Slatron includes a powerful bumper system for creating professional station branding elements like idents, transitions, and lower thirds.
Bumper Architecture
The bumper system uses a two-layer approach:
- Bumper Backs: Base video files that p
