induwara.lk
Opinionopen-sourcelocal-aiaudio

StemDeck: free AI stem separation that runs on your laptop

StemDeck is a free, open-source AI stem separator that runs entirely offline. The interesting part isn't the audio — it's the zero-inference-bill architecture underneath.

Induwara Ashinsana5 min read
StemDeck desktop app showing a multi-track waveform editor with separated instrument stems
Image: GitHub

A free, open-source AI stem separator that runs entirely on your own machine landed on Hacker News this week, and the audio part is the least interesting thing about it. StemDeck (github.com/stemdeckapp/stemdeck) splits a song into vocals, drums, bass, piano and guitar, offline, under Apache-2.0.

I care about it for a different reason. It is a working demonstration that you can ship a real AI product from Sri Lanka with an inference bill of exactly zero.


🎛️ What it actually does, minus the pitch

The separation engine is Demucs htdemucs_6s, the open six-stem model from Meta AI. StemDeck wraps it in a waveform editor with per-stem volume, mute, solo, VU meters, and a WAV export. There's optional secondary vocal splitting through a UVR-MDX-NET karaoke model.

Item Detail
License Apache-2.0
Model weights ~170 MB, downloaded once, cached after
Runtime Python 3.12+, FFmpeg
Acceleration NVIDIA CUDA, Apple Silicon MPS, or CPU fallback
Input formats MP3, WAV, FLAC, OGG/Opus, MP4, M4A
Platforms macOS (arm64/x64), Windows x64, Linux, Docker, Unraid

The README is honest about what it doesn't have, which is rarer than it should be: no mobile apps, no pitch shifting, no chord detection, no lyrics, no click tracks, no batch processing. It names Moises and LALAL.AI as the commercial products it isn't trying to beat on model quality.

Internet is needed only for the first model download and for the YouTube input path. Everything else happens on your hardware, with no upload.


💰 The economics are the actual story

Think about what this app would cost to run as a SaaS. Audio separation is heavy, sustained compute. Every user upload is minutes of GPU time you pay for whether they subscribe or churn. That's why every commercial competitor is a subscription — it has to be.

StemDeck moves that cost onto the user's laptop, where it becomes free. Not cheap. Free.

Hosted AI SaaS Local-first app
Marginal cost per job Yours The user's electricity
Scaling risk Viral post = surprise bill None
Payment friction for LK users USD card, forex limits None
Privacy story "We delete your files" Files never leave the machine
Offline No Yes

That third row matters more here than most places. Paying a monthly USD subscription from a Sri Lankan card means a card that supports it, headroom under your forex limit, and an exchange rate you didn't choose. A one-time download sidesteps all of it. If you want to sanity-check what the hosted equivalent of a media-AI feature would cost you per hour of audio, our AI transcription cost calculator does the same arithmetic for a neighbouring problem.

Key takeaway: The barrier to shipping an AI product from a low-capital market was never the model. Open weights fixed that. It was the recurring inference bill — and running on the user's hardware deletes it.


🛠️ The architecture is the part worth copying

Strip the audio domain out and you get a packaging pattern that generalises to almost any local-first AI tool.

  • Python 3.12 + FastAPI backend, managed with uv
  • Tauri v2 (Rust) desktop shells rather than Electron
  • Vanilla JavaScript frontend, Web Audio API, canvas waveform rendering
  • librosa for BPM, pyloudnorm for LUFS
  • FFmpeg for audio I/O
  • Same codebase serves as a local web app on http://localhost:8000

Two choices stand out. Tauri over Electron keeps the shipped binary small, which matters when your users are downloading over a connection they pay for by the gigabyte. And running the exact same FastAPI server whether it's a desktop app, a Docker container, or an Unraid appliance means one backend to maintain across five distribution channels.

git clone https://github.com/stemdeckapp/stemdeck
./run.sh setup && ./run.sh start
# opens at http://localhost:8000

The desktop builds bundle their own Python runtime, so users never see a dependency error. That's the unglamorous work that decides whether an open-source tool gets used or gets starred and forgotten.


⚠️ One feature I'd think twice about

StemDeck accepts a pasted YouTube URL as an input source. Technically convenient. Legally, it is the one part of this app I would not build into anything I shipped publicly.

Separating a track you own, or one you recorded yourself, is your business. Pulling audio off YouTube runs into their terms of service and, depending on the track, straight into copyright. If you're a solo builder, that's not a fight worth having over a convenience feature.

If you're forking this for anything public-facing, my advice: rip that input path out and keep file upload only. The separation engine is the valuable part; the downloader is pure liability.

For personal use on material you have rights to — your own multitrack, a recording of your own band, a public-domain piece — none of this applies.


🎓 Who here should actually run it

Concrete cases where this earns its 170 MB:

  1. Music teachers. Mute the piano stem, hand the student the rest as a backing track. No subscription, no per-song cost.
  2. Cover and wedding bands. Build practice mixes for baila or pop sets without buying commercial backing tracks.
  3. Choirs and ensembles. Isolate a single part so a section can rehearse against it.
  4. Video editors. Pull a clean vocal or strip one to reuse a bed under narration.
  5. CS students. A real, readable application of a published separation model, with the analysis pipeline (BPM, key, LUFS) sitting right next to it. Better portfolio material than another to-do app.

Hardware reality check: the README says speed depends entirely on your machine, and CPU-only is slower. On a mid-range laptop without a discrete GPU, expect to start a job and go make tea. That's the trade you're making, and for a free tool it's a fair one.


What this means for you 🚀

If you want the tool, take it. It's Apache-2.0, the installers are prebuilt, and nothing you feed it leaves your machine.

If you're building something, take the pattern instead. The question worth asking about your own idea is: does this actually need to run on my server? If the model has open weights and the job is one user's file at a time, the honest answer is usually no. Push the compute to the client and your hosting cost collapses to static file delivery — which is roughly the difference between a project you can afford to run indefinitely and one you quietly shut down when the free credits end.

The constraint that shapes software built in Sri Lanka has always been the running cost, not the ideas. Open weights plus local execution is the first credible answer to it I've seen that doesn't require a funding round.

#open-source#local-ai#audio
IA

Induwara Ashinsana

Information Systems student at UCSC and Executive Director at Ryzera Technologies. Writes about software, AI, and what it means for builders in Sri Lanka.

About the author →

Keep reading