Files
nvrl 3e5dbfe460 Add sigil-vocals, a vocal isolation program
A small CLI that runs an MDX-Net vocal model (the ONNX files from the
Ultimate Vocal Remover set, e.g. UVR_MDXNET_1_9703 or Kim_Vocal_2) on a
44.1 kHz WAV and writes the vocal stem, so speech to text hears the words
instead of the drop. The mix is cut into overlapping chunks, STFT'd
(periodic Hann, hop 1024, centred) and fed to the model as L/R real and
imaginary planes, as UVR does; known models bring their n_fft, dim_f and
level compensation, others get dim_f from the model's input shape.

ONNX Runtime is loaded at run time (ort's load-dynamic): $ORT_DYLIB_PATH,
else the library next to the program, else the system's. Nothing links,
so the mingw cross-build works and the bundles ship Microsoft's prebuilt
library. Pure-Rust tract was tried first and was about three times slower.
Progress goes to stderr as "progress = N%", the same line whisper-cli
prints. CI runs its tests and cross-builds it for Windows.
2026-11-11 00:00:01 +01:00

78 lines
2.9 KiB
YAML

name: CI
on:
push:
branches: [main, master]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
# Fast gate: the dependency-light shared model. No system deps, runs in
# seconds — fails the PR early on a model regression before the heavy engine
# build even starts.
model:
name: sigil-model (fmt + clippy + test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo fmt --manifest-path sigil-gui/Cargo.toml -- --check
- run: cargo clippy -p sigil-model --all-targets
- run: cargo test -p sigil-model
# The engine + launcher need nannou/cpal/wgpu system headers to compile.
# No GPU/display on the runner, so we build + clippy but do not run the
# live/render binaries (only `sigil-model` has runnable tests).
build:
name: engine + launcher (clippy + build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Install system deps (cpal/ALSA, nannou/winit/wgpu)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libasound2-dev libudev-dev pkg-config \
libxkbcommon-dev libwayland-dev libxcursor-dev libxrandr-dev \
libxi-dev libx11-dev libgl1-mesa-dev
- run: cargo clippy --workspace --all-targets
- run: cargo build --workspace
# The launcher is its own workspace (see the root Cargo.toml).
- run: cargo clippy --manifest-path sigil-gui/Cargo.toml --all-targets
- run: cargo test --manifest-path sigil-gui/Cargo.toml
# Engine analysis tests are CPU-only (no GPU/display) — safe to run here.
- run: cargo test -p audio-visualizer --lib
# sigil-vocals' tests cover the STFT and chunking; ONNX Runtime is only
# loaded when a model runs, so none is needed here.
- run: cargo test -p sigil-vocals
# Mirrors the documented Windows cross-build flow for `sigil` / `sigil-gui`.
windows-cross:
name: windows cross-build (x86_64-pc-windows-gnu)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-gnu
- uses: Swatinem/rust-cache@v2
- name: Install mingw-w64
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gcc-mingw-w64-x86-64
- name: Cross-build the launcher
run: cargo build --manifest-path sigil-gui/Cargo.toml --target-dir target --release --target x86_64-pc-windows-gnu
- name: Cross-build sigil-vocals
run: cargo build -p sigil-vocals --release --target x86_64-pc-windows-gnu