惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
量子位
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
美团技术团队
Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理
罗磊的独立博客
Jina AI
Jina AI
小众软件
小众软件
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
博客园 - 聂微东
博客园_首页
The Cloudflare Blog
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Ran a Neural Network in a Browser Tab to Split a Song i...
Aral Roca · 2026-04-25 · via DEV Community

Last week a friend sent me a voice memo. "I found this incredible bass line in an old soul track," he said, "but I can't isolate it without paying $30/month for some cloud service that wants my email, my credit card, and probably my firstborn."

He's not wrong. The audio stem separation landscape in 2026 is a mess of subscription walls and cloud uploads. Most tools send your audio to a remote GPU, process it, and send back the stems. You get results in minutes, sure, but your unreleased remix idea now lives on someone else's server.

I wanted to see if the entire pipeline could run locally, in a browser tab, with zero network requests after the initial page load.

Turns out it can.

What stem separation actually is

For those unfamiliar: source separation (also called demixing or unmixing) is the process of decomposing a mixed audio signal into its constituent sources. A typical pop track is a sum of vocals, drums, bass, and everything else (guitars, synths, keys, strings). The AI's job is to reverse that sum.

The state of the art traces back to Meta's Demucs, a hybrid model that operates in both time domain and frequency domain simultaneously. It was trained on thousands of multitrack recordings where the individual stems are known, so it learned the spectral fingerprints that distinguish a kick drum from a bass guitar from a human voice.

The interesting bit is that Demucs v4 (htdemucs) uses a transformer architecture fused with a convolutional U-Net. The transformer handles long-range dependencies (like a sustained vocal note over a drum fill), while the U-Net captures local spectral patterns. The result is significantly less "bleeding" between stems compared to older approaches.

Running it in the browser with ONNX + WebAssembly

The Audio Stem Splitter on Kitmul loads an ONNX-exported version of the Demucs model and runs inference entirely via ONNX Runtime Web backed by WebAssembly. No server. No upload. The audio bytes never leave your machine.

The Kitmul Audio Stem Splitter interface showing the upload area and generated stems panel

Here's what happens when you drop an audio file:

  1. The file is decoded to raw PCM using the Web Audio API's decodeAudioData
  2. If the sample rate isn't 44100 Hz, it gets resampled via an OfflineAudioContext
  3. The audio is chunked and fed through the ONNX model in a Web Worker to avoid blocking the UI thread
  4. The model outputs four spectral masks (vocals, drums, bass, other)
  5. Each mask is applied to the original spectrogram to produce isolated stems
  6. The stems are encoded back to WAV for download

The whole pipeline is embarrassingly parallel in theory, but in practice you're bounded by the single WASM thread and available RAM. A 4-minute song takes roughly 3-5 minutes on a modern laptop. Not fast, but not bad for running a neural network in a browser tab.

The privacy argument nobody is making

Every time you upload a track to LALAL.AI, Moises, or Stem Roller, you're sending potentially copyrighted audio (or your own unreleased work) to a third-party server. Their privacy policies usually say they "don't store your files permanently," but the operative word is "permanently."

With client-side processing, the question of data retention is moot. There's nothing to retain. Your browser downloads the model weights once (cached for future visits), runs the math locally, and produces output files that exist only in your device's memory until you explicitly save them.

This matters especially for:

  • Producers working with unreleased material
  • DJs preparing sets with copyrighted tracks
  • Music teachers creating practice tracks for students
  • Forensic audio analysts working with sensitive recordings

A music studio with instruments and warm ambient lighting

Practical use cases I didn't expect

The obvious use case is karaoke (remove vocals, sing along). But I've seen people use stem separation for things I hadn't considered:

Transcription aid. A jazz pianist told me she splits out the piano stem from classic recordings to transcribe voicings more accurately. When you can hear the piano in isolation, you catch harmonic details that get buried in the full mix.

Sample archaeology. Hip-hop producers dig through vinyl rips looking for loops. Isolating the drum break from a 1970s funk track gives you a clean sample without having to EQ out the horns by hand.

Accessibility. Someone who is hard of hearing mentioned that boosting the vocal stem and attenuating the instrumental makes dialogue-heavy content (podcasts with music beds, film scenes) significantly clearer.

A/B testing mixes. If you're learning to mix, splitting a professional track into stems lets you rebuild the mix from scratch in your DAW and compare your choices against the original balance.

The model's limitations (honest take)

The separation isn't perfect. Here's where the model struggles:

  • Heavily compressed or low-bitrate audio produces more artifacts. Start with 320kbps MP3 or WAV if you can.
  • Dense arrangements with many layered instruments bleed more into the "other" stem. A solo guitar-and-voice track separates beautifully; a wall-of-sound Phil Spector production, not so much.
  • Mono recordings lose the spatial cues that help the model distinguish sources. Stereo is always better.
  • Very long files (>10 minutes) will challenge your device's RAM. The 50MB file size limit is there for a reason.

If you need studio-grade results for a commercial release, you probably want iZotope RX or the full Demucs CLI on a GPU. But for quick workflows, creative exploration, or situations where privacy matters more than perfection, browser-based separation is genuinely useful.

Musical score and waveform visualization concept

How it compares to the competition

Feature Kitmul Stem Splitter LALAL.AI Moises Demucs CLI
Processing 100% local (browser) Cloud GPU Cloud GPU Local GPU/CPU
Price Free $15-30/mo $4-17/mo Free (OSS)
Privacy No upload Upload required Upload required No upload
Setup Zero Account + payment Account + payment Python + ffmpeg
Quality Good (ONNX htdemucs) Very good Very good Best (full model)
Speed 3-5 min/song ~30 sec ~1 min ~30 sec (GPU)

The tradeoff is clear: you sacrifice some speed and marginal quality for zero setup, zero cost, and complete privacy. For most non-professional workflows, that's the right call.

The Web Audio API is more capable than you think

Building this reinforced something I keep discovering: the browser audio stack is seriously underrated. Between AudioContext for real-time processing, OfflineAudioContext for offline rendering, AudioWorklet for custom DSP on a dedicated thread, and now ONNX Runtime Web for running neural networks, you can build legitimate audio production tools that would have required native apps five years ago.

If you're a developer interested in this space, the combination of Web Workers for heavy computation + SharedArrayBuffer for zero-copy data transfer + WASM for near-native math performance is the stack to bet on.

Try it

The Audio Stem Splitter is free, works in any modern browser, and processes everything locally. Drop an MP3 or WAV, wait a few minutes, and download your isolated vocals, drums, bass, and instrumental tracks.

If you're into music production, the Loop Music Creator (browser-based DAW) and the YouTube Loop Mix (dual-deck DJ tool) pair well with separated stems for remixing workflows.

All three tools run in your browser. No accounts. No uploads. No subscriptions.