HTDemucs offline voice and music separation

AudioOfflineCommercial use OK

Splits a video's sound into the voice and the background, music and effects included, with Meta's HTDemucs, on your own computer. It runs on the CPU with no PyTorch, and the model is a 62 MB download.

Install it from Subtitld

Settings Add-ons HTDemucs (offline voice and music separation) Install

Subtitld downloads it, checks its SHA-256, and keeps it updated.

Source on GitHub
Models
1
Add-on download
14–17 MB
RAM, at least
1.6 GB

What it does

Voice and background

HTDemucs gives Subtitld two tracks: the voice, and everything else, music and effects included. A voice in the middle of the stereo mix no longer takes the bass and the lead instruments with it, as it can with the built-in ffmpeg separator, and mono videos work too.

Your dub over the original

Export audio with Include background audio and your dub is mixed over the background, without the original voice.

Voices for cloning

When a voice-cloning add-on needs a sample of a speaker, Subtitld cuts it from the voice track, so the music stays out of it.

Once per video

Subtitld separates a video when you open it and keeps both tracks, so reopening the project reuses them.

Choose it under Global settings › General › Audio separator. The built-in ffmpeg separator stays in the list.

Before you install

HTDemucs is the heaviest of the four light separators, and the only one made for music:

  • Disk: about 80 MB, most of it the 62 MB model, downloaded the first time you separate a video. While it works, the add-on also keeps the video's decoded sound in Subtitld's temporary folder, about 21 MB a minute of video.
  • Memory: about 1.5 GB, whatever the length of the video.
  • Time: about as long as the video plays. A minute of video took 73 seconds on an Intel Core i7-13700T, with other programs running.

Which separator?

Separator Best for Speed Memory
Built-in ffmpeg A quick result, nothing to install Seconds Little
HTDemucs Voices over music and effects About real time About 1.5 GB
MossFormer2 Speech over noise and room sound About a fifth of real time About 400 MB
DeepFilterNet Speech over background noise About a tenth of real time About 200 MB
RNNoise Speech over hum, hiss and wind A second a minute About 100 MB

Models

There is one model, HTDemucs, with its weights stored in 8 bits, as the audio.cpp project converted it. It splits the sound into vocals, drums, bass and the rest; the add-on keeps the vocals as the voice, and the background is the original sound minus the voice. Singing counts as voice.

Model DownloadGood for
HTDemucs (8-bit) Default htdemucs
59 MB
Voices against music and effects, singing included

It is not inside the add-on: it downloads into Subtitld's shared model cache the first time you separate a video, from Hugging Face at a pinned revision, and is checked. An interrupted download resumes where it stopped. Updating or removing the add-on keeps the model.

How it separates

The add-on reads the video's first audio track with Subtitld's own ffmpeg, so nothing else needs installing. HTDemucs then takes the sound in 30-second pieces, each overlapping the one before by a second, and blends the overlaps, so no seam is heard. Both tracks come back as 48 kHz mono, as the built-in separator's do. A cancelled separation stops between two pieces, or stops the download.

Subtitld keeps the tracks of every video it has separated and reuses them, so choosing another separator applies to videos that haven't been separated yet. To redo one, delete its files from the audioseparation folder in Subtitld's cache. From Subtitld 26.12, while the built-in separator is the default, you can also right-click the Music/Voice control and pick an add-on under Separate this video with, to try it on the open video.

Options

In Settings › Add-ons › HTDemucs (offline voice and music separation) › Configure.

CPU threads
Default: 0

0 picks the performance cores on CPUs that also have efficiency cores. Fewer threads keep the computer more responsive while it separates.

Platforms

System DownloadTested
Linux x86-64 16.9 MBSeparated real videos on a real machine and checked on AlmaLinux 8; built and checked in CI
macOS (Apple silicon) 16.1 MBIn CI, the installed add-on downloads the model, separates a video and cancels a separation (Apple Silicon)
Windows x86-64 13.6 MBIn CI, the installed add-on downloads the model, separates a video and cancels a separation

Linux x86-64 (any distribution from 2018 on, glibc 2.28 or newer), macOS 13.3 or newer on Apple Silicon, and Windows x86-64. Each release is built on all three, and on each CI installs the add-on, downloads the model, separates a video and cancels a separation.

Troubleshooting

From Subtitld 26.12 a failed separation shows its message; in earlier versions the Music/Voice control just stays off.

  • network_unavailableThe model couldn't be downloaded. Check your connection and try again: the download resumes.
  • disk_fullNot enough disk space, for the model or for the video's decoded sound.
  • oomOut of memory. Close other programs; HTDemucs needs about 1.5 GB free.
  • bad_paramsThe video has no sound, or ffmpeg couldn't read it. The message says which.
  • internalSomething failed inside the add-on; the message has the details.

License

Add-on
Apache-2.0
Engine
Apache-2.0
audio.cpp, with ggml (MIT)
Model
MIT
HTDemucs weights, by Meta

Fine for commercial work: the add-on and the audio.cpp engine are Apache-2.0, and the HTDemucs weights and ggml, which audio.cpp runs on, are MIT.

Versions

  • 26.11.1

    The voice and the background of a video, separated offline by Meta's HTDemucs, run by audio.cpp on the CPU: no PyTorch.

    • Serves audio.separate, like Subtitld's built-in ffmpeg separator, with a neural model instead of the mid/side trick: a centred voice no longer takes the bass and lead instruments with it, and mono videos work too.
    • The 8-bit model, 62 MB, downloads on the first separation, pinned and checked by sha256; an interrupted download resumes.
    • The sound goes through in 30-second pieces, crossfaded: about 1.5 GB of memory for any length of video, and Cancel stops between two pieces.
    • The voice and the background come back as 48 kHz mono FLAC.
    • About as long as the video plays, on an Intel Core i7-13700T.

Other Audio add-ons