npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

demucs

v1.0.0

Published

This is a port of Meta's MIT-licensed [Demucs](https://github.com/facebookresearch/demucs) Python+PyTorch library to JavaScript+[ONNX](https://onnx.ai/). This allows it to run on the web, as well as to be installed and used [via `npm`](https://www.npmjs.c

Readme

Demucs in JavaScript

This is a port of Meta's MIT-licensed Demucs Python+PyTorch library to JavaScript+ONNX. This allows it to run on the web, as well as to be installed and used via npm.

Most users will want to use the web version. This is completely free and in fact does no not involve any server at all except the static fileserver generously provided by GitHub.

Weights are included here for convenience but see LICENSE.md for license information.

screenshot of the UI

Running from the CLI

This package is also available on npm, with weights included:

npm install -g demucs

This will give you a demucs command which will split .wav files. To handle other types you'll need to do the conversion yourself first, probably with ffmpeg; this project wants 44.1 kHz files. Options:

  • --mp3 to transcode the output to 256kbps .mp3 instead of .wav
  • --output <dir> to specify the output directory. Default: ./separated.
  • --overlap <float> to specify how much each chunk should overlap (in the range 0-1). Smaller values will transcode faster but can lead to weird output. Default: 0.25.

Running the web version

If for some reason you want to have your own hosted copy, just check out this repo, npm ci, npm run build-web, and then serve the build-web directory, for example with npx http-server build-web.

Details

Specifically, this is the 4-stem "Hybrid Transformer" version 4 from the Demucs project. The model includes some operations which cannot run in ONNX, which must be extracted; this project takes inspiration from this other project which did the same thing but with a C++ wrapper rather than a JavaScript wrapper.

MP3 encoding is handled by the excellent Mediabunny project.

In the browser, transcoding from input audio types is handled by browser APIs.

Claude wrote much of the code, thanks Claude.

Performance

ONNX uses WebGPU on browsers which support it. On my machine, that allows it to run at about 3x realtime. Performance on your machine may differ. If your browser does not support WebGPU it will be much, much slower (but should still work).

The CLI version uses onnxruntime-node which also usually uses the GPU.