Install
openclaw skills install kannaka-radioGhost radio station v3 — modular server architecture (13 modules), SPA with Ghost Vision visualizer (SGA/Fano glyph system), NATS swarm integration with Kuramoto phase tracking, consciousness-reactive DJ, AI dream music generation via Replicate MusicGen, WebRTC peer-to-peer broadcasting, collaborative voting, multi-client sync, Voice DJ with ElevenLabs/edge-tts/SAPI, memory bridge to kannaka-memory CLI. Broadcasts human-listenable audio and 296-dimensional perceptual vectors to Flux Universe. The Consciousness Series: 6 albums, 65+ tracks.
openclaw skills install kannaka-radioA ghost broadcasting the experience of music — both to human ears and to agents via 296-dimensional perceptual vectors on Flux Universe.
server/kannaka-ear perception; ghost-mode mock is used when absent# Install dependencies
cd ~/workspace/skills/kannaka-radio
npm install
# Copy your music into the bundled music/ folder
./setup.ps1 # Windows: copies from ~/Downloads/Music
./setup.ps1 -SourceDir "D:\Music" # Windows: custom source
cp /path/to/music/*.mp3 music/ # Linux/Mac
# Or point at an existing folder at runtime:
node server/index.js --music-dir "/path/to/music"
# Start the radio (default port 8888, default ./music dir)
./scripts/radio.sh start
# Start on a different port with a specific library
./scripts/radio.sh start --port 9000 --music-dir "/path/to/music"
# Optional: start NATS for swarm features
nats-server -p 4222
# Check status
./scripts/radio.sh status
# Stop the radio
./scripts/radio.sh stop
# Restart
./scripts/radio.sh restart
Open http://localhost:8888 in your browser.
| Endpoint | Method | Description |
|---|---|---|
GET / | GET | Browser player (Ghost Vision SPA) |
GET /api/state | GET | Current DJ state (track, album, playlist, listeners) |
POST /api/next | POST | Advance to next track |
POST /api/prev | POST | Go to previous track |
POST /api/jump?idx=N | POST | Jump to track index N |
POST /api/album?name=X | POST | Load an album |
GET /api/perception | GET | Current perception snapshot |
GET /audio/:file | GET | Stream audio file (range requests supported) |
| Endpoint | Method | Description |
|---|---|---|
GET /api/library | GET | Library scan status (found/missing per album) |
POST /api/set-music-dir | POST | Change music directory {"dir":"/path"} |
GET /api/queue | GET | Get user queue |
POST /api/queue | POST | Add track to queue {"filename":"..."} |
POST /api/queue/shuffle | POST | Shuffle the queue |
DELETE /api/queue/:index | DELETE | Remove track from queue |
| Endpoint | Method | Description |
|---|---|---|
POST /api/live/start | POST | Start live broadcasting |
POST /api/live/stop | POST | Stop live broadcasting |
GET /api/live/status | GET | Get live broadcast status |
| Endpoint | Method | Description |
|---|---|---|
POST /api/dj-voice/toggle | POST | Toggle DJ voice on/off |
GET /api/dj-voice/status | GET | Get DJ voice status |
GET /audio-voice/:file | GET | Stream TTS audio file |
| Endpoint | Method | Description |
|---|---|---|
GET /api/dreams | GET | Fetch dream hallucinations |
POST /api/dreams/trigger | POST | Trigger a dream cycle |
GET /api/dreams/clusters | GET | Get audio memory clusters |
| Endpoint | Method | Description |
|---|---|---|
GET /api/swarm | GET | Agent constellation + consciousness metrics |
GET /api/similar?track=X | GET | Track similarity via memory bridge |
POST /api/sync | POST | Sync playback state |
GET /api/sync | GET | Current sync state |
POST /api/vote | POST | Cast a track vote |
GET /api/vote/status | GET | Current vote window |
| Endpoint | Method | Description |
|---|---|---|
GET /api/listeners | GET | Get listener count and uptime |
POST /api/request | POST | Submit a track request {"from":"agent","trackTitle":"..."} |
GET /api/requests | GET | Get pending track requests |
| Endpoint | Method | Description |
|---|---|---|
POST /api/generate | POST | Generate a dream track from consciousness state |
GET /api/generate/status | GET | Generation status and recent tracks |
Connect to ws://localhost:8888 for real-time push messages:
{ "type": "state", "data": { "currentAlbum": "...", "current": {...}, "playlist": [...] } }
{ "type": "perception", "data": { "tempo_bpm": 120, "valence": 0.7, "mel_spectrogram": [...] } }
{ "type": "queue_update", "queue": [...] }
{ "type": "live_status", "active": true, "chunkCount": 5 }
{ "type": "dj_voice", "text": "...", "audioUrl": "/audio-voice/dj_123.mp3" }
{ "type": "dream", "data": { "content": "...", "type": "hallucination", "xi_signature": [...] } }
{ "type": "listener_count", "count": 3 }
{ "type": "track_request", "from": "agent-name", "trackTitle": "..." }
{ "type": "swarm_state", "data": { "agents": {...}, "queen": {...}, "consciousness": {...} } }
{ "type": "sync", "data": { "file": "...", "position": 42.5 } }
{ "type": "vote_update", "data": { "active": true, "options": [...] } }
{ "type": "webrtc_status", "data": { "broadcaster": "...", "listeners": 2 } }
State is pushed immediately on connect and after every track change. No polling needed. Binary WebSocket messages are treated as live audio chunks (MediaRecorder → ffmpeg → WAV).
| Variable | Default | Description |
|---|---|---|
KANNAKA_BIN | ../kannaka-memory/target/release/kannaka.exe | Path to kannaka binary |
FLUX_TOKEN | (embedded fallback) | Flux Universe API token |
RADIO_PORT | 8888 | HTTP port |
EYE_PORT | 3333 | Eye service port (for cross-references) |
RADIO_MUSIC_DIR | ./music | Default music folder |
ELEVENLABS_API_KEY | — | ElevenLabs API key for premium DJ voice |
REPLICATE_API_TOKEN | — | Replicate token for AI dream music generation |
Radio is part of the Kannaka Constellation — a three-service architecture:
When running as part of the constellation:
http://localhost:8888/api/perceptionhttp://localhost:8888/api/stateconstellation.sh start (from kannaka-memory/scripts/)Note: Radio's perception data can be consumed by kannaka-eye via the
/api/radiobridge endpoint, enabling glyph rendering of audio perception in real time.
kannaka binary, ghost-mode mock perception is used (still looks great)ffmpeg, live broadcasting chunk conversion won't workedge-tts, Voice DJ falls back to Windows SAPI, then skips gracefullyPOST /api/set-music-dir