nightingale-karaoke
ML-powered Karaoke app in Rust using Bevy, WhisperX, and Demucs for stem separation, lyrics transcription, and pitch scoring.
What this skill does
# Nightingale Karaoke Skill
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Nightingale is a self-contained, ML-powered karaoke application written in Rust (Bevy engine). It scans a local music folder, separates vocals from instrumentals (UVR Karaoke model or Demucs), transcribes lyrics with word-level timestamps (WhisperX), and plays back with synchronized highlighting, real-time pitch scoring, player profiles, and GPU shader / video backgrounds. Everything — ffmpeg, Python, PyTorch, ML models — is bootstrapped automatically on first launch.
---
## Installation
### Pre-built Binary (Recommended)
Download the latest release from the [Releases page](https://github.com/rzru/nightingale/releases) for your platform and run it.
**macOS only** — remove quarantine after extracting:
```bash
xattr -cr Nightingale.app
```
### Build from Source
**Prerequisites:**
- Rust 1.85+ (edition 2024)
- Linux additionally needs: `libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev`
```bash
git clone https://github.com/rzru/nightingale
cd nightingale
# Development build
cargo build --release
# Run directly
./target/release/nightingale
```
### Release Packaging
```bash
# Linux / macOS
scripts/make-release.sh
# Windows (PowerShell)
powershell -ExecutionPolicy Bypass -File scripts/make-release.ps1
```
Outputs a `.tar.gz` (Linux/macOS) or `.zip` (Windows) ready for distribution.
---
## First Launch / Bootstrap
On first run, Nightingale downloads and configures:
- `ffmpeg` binary
- `uv` (Python package manager)
- Python 3.10 via uv
- PyTorch + WhisperX + audio-separator in a virtual environment
- UVR Karaoke ONNX model and WhisperX `large-v3` model
This takes **2–10 minutes** depending on network speed. A progress screen is shown in-app.
To force re-bootstrap at any time:
```bash
./nightingale --setup
```
Bootstrap completion is marked by `~/.nightingale/vendor/.ready`.
---
## CLI Flags
| Flag | Description |
|---|---|
| `--setup` | Force re-run of the first-launch bootstrap (re-downloads vendor deps) |
---
## Keyboard & Gamepad Controls
### Navigation
| Action | Keyboard | Gamepad |
|---|---|---|
| Move | Arrow keys | D-pad / Left stick |
| Confirm | Enter | A (South) |
| Back | Escape | B (East) / Start |
| Switch panel | Tab | — |
| Search | Type to filter | — |
### Playback
| Action | Keyboard | Gamepad |
|---|---|---|
| Pause / Resume | Space | Start |
| Exit to menu | Escape | B (East) |
| Toggle guide vocals | G | — |
| Guide volume up/down | + / - | — |
| Cycle background | T | — |
| Cycle video flavor | F | — |
| Toggle microphone | M | — |
| Next microphone | N | — |
| Toggle fullscreen | F11 | — |
---
## Configuration
### Main Config
Located at `~/.nightingale/config.json`. Edit directly or via in-app settings.
```json
{
"music_folder": "/home/user/Music",
"separator": "uvr",
"guide_vocal_volume": 0.3,
"background_theme": "plasma",
"video_flavor": "nature",
"default_profile": "Alice"
}
```
**`separator` options:** `"uvr"` (default, preserves backing vocals) | `"demucs"`
**`background_theme` options:** `"plasma"`, `"aurora"`, `"waves"`, `"nebula"`, `"starfield"`, `"video"`, `"source_video"`
**`video_flavor` options:** `"nature"`, `"underwater"`, `"space"`, `"city"`, `"countryside"`
### Profiles
Located at `~/.nightingale/profiles.json`:
```json
{
"profiles": [
{
"name": "Alice",
"scores": {
"blake3_hash_of_song": {
"stars": 4,
"score": 87250,
"played_at": "2026-03-18T21:00:00Z"
}
}
}
]
}
```
### Pixabay Video Backgrounds (Dev)
API key is embedded in release builds. For local development, create `.env` at project root:
```bash
# .env
PIXABAY_API_KEY=$PIXABAY_API_KEY
```
The release script (`make-release.sh`) sources `.env` automatically.
---
## Data Storage Layout
```
~/.nightingale/
├── cache/ # Per-song stems, transcripts, lyrics (keyed by blake3 hash)
├── config.json # App settings
├── profiles.json # Player profiles and per-song scores
├── videos/ # Pre-downloaded Pixabay video backgrounds
├── sounds/ # Sound effects
├── vendor/
│ ├── ffmpeg # ffmpeg binary
│ ├── uv # uv binary
│ ├── python/ # Python 3.10
│ ├── venv/ # ML virtualenv (WhisperX, Demucs, audio-separator)
│ ├── analyzer/ # Python analyzer scripts
│ └── .ready # Bootstrap completion marker
└── models/
├── torch/ # Demucs model weights
├── huggingface/ # WhisperX large-v3 weights
└── audio_separator/ # UVR Karaoke ONNX model
```
Cache keys are **blake3 hashes** of the source file — re-analysis only triggers if the file changes or is manually invalidated.
---
## Supported File Formats
**Audio:** `.mp3`, `.flac`, `.ogg`, `.wav`, `.m4a`, `.aac`, `.wma`
**Video:** `.mp4`, `.mkv`, `.avi`, `.webm`, `.mov`, `.m4v`
Video files: audio track is extracted, vocals separated, original video plays as background automatically.
---
## Hardware Acceleration
PyTorch backend is auto-detected:
| Backend | Device | Notes |
|---|---|---|
| CUDA | NVIDIA GPU | Fastest; ~2–5 min/song |
| MPS | Apple Silicon | macOS; WhisperX alignment falls back to CPU |
| CPU | Any | Always works; ~10–20 min/song |
UVR Karaoke model uses ONNX Runtime with CUDA (NVIDIA) or CoreML (Apple Silicon) automatically.
---
## Processing Pipeline
```
Audio/Video file
│
▼
UVR Karaoke (ONNX) or Demucs (PyTorch)
│ vocals.ogg + instrumental.ogg
▼
LRCLIB API ──▶ Synced lyrics fetch (if available)
│
▼
WhisperX large-v3 ──▶ Transcription + word-level timestamps
│
▼
Bevy App (Rust)
- Plays instrumental audio
- Synchronized word highlighting
- Real-time pitch detection & scoring
- GPU shader / video backgrounds
- Scoreboards per profile
```
---
## Code Patterns
### Adding a New Background Theme (Bevy System)
```rust
// In your Bevy plugin, register a new background variant
use bevy::prelude::*;
#[derive(Component)]
pub struct MyCustomBackground;
pub fn spawn_custom_background(mut commands: Commands) {
commands.spawn((
MyCustomBackground,
// ... your background components
));
}
pub struct CustomBackgroundPlugin;
impl Plugin for CustomBackgroundPlugin {
fn build(&self, app: &mut App) {
app.add_systems(OnEnter(AppState::Playing), spawn_custom_background);
}
}
```
### Extending Config Deserialization
```rust
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NightingaleConfig {
pub music_folder: String,
#[serde(default = "default_separator")]
pub separator: StemSeparator,
#[serde(default = "default_guide_volume")]
pub guide_vocal_volume: f32,
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "lowercase")]
pub enum StemSeparator {
#[default]
Uvr,
Demucs,
}
fn default_guide_volume() -> f32 { 0.3 }
fn default_separator() -> StemSeparator { StemSeparator::Uvr }
// Load config
fn load_config() -> NightingaleConfig {
let path = dirs::home_dir()
.unwrap()
.join(".nightingale/config.json");
let raw = std::fs::read_to_string(&path).unwrap_or_default();
serde_json::from_str(&raw).unwrap_or_default()
}
```
### Triggering Re-analysis Programmatically
```rust
use std::fs;
use std::path::PathBuf;
/// Remove cached stems/transcript for a song to force re-analysis
fn invalidate_song_cache(song_hash: &str) {
let cache_dir = dirs::home_dir()
.unwrap()
.join(".nightingale/cache")
.join(song_hash);
if cache_dir.exists() {
fs::remove_dir_all(&cache_dir)
.expect("Failed to remove cache directory");
println!("Cache invalidated for {}", song_hash);
}
}
```
### Computing a Song's Blake3 Hash (for Cache Lookup)
```rust
use blake3::Hasher;
use Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.