<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: asad</title>
    <description>The latest articles on DEV Community by asad (@asad_93c0825e813f642852dd).</description>
    <link>https://dev.to/asad_93c0825e813f642852dd</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4262026%2Ffffd6213-377f-475a-a030-79f6d2f16d99.png</url>
      <title>DEV Community: asad</title>
      <link>https://dev.to/asad_93c0825e813f642852dd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asad_93c0825e813f642852dd"/>
    <language>en</language>
    <item>
      <title>Removing Vocals From a Song With Demucs and ffmpeg</title>
      <dc:creator>asad</dc:creator>
      <pubDate>Tue, 24 Nov 2026 07:12:34 +0000</pubDate>
      <link>https://dev.to/asad_93c0825e813f642852dd/removing-vocals-from-a-song-with-demucs-and-ffmpeg-11ll</link>
      <guid>https://dev.to/asad_93c0825e813f642852dd/removing-vocals-from-a-song-with-demucs-and-ffmpeg-11ll</guid>
      <description>&lt;p&gt;Source separation used to be a research toy. Today you can pull a vocal out of a mixed song with a single command, and the results are good enough for karaoke, remixes and practice tracks. Here is a quick, practical tour for developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The models doing the work
&lt;/h2&gt;

&lt;p&gt;Most modern vocal removers are built on one of a few open model families:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Demucs&lt;/strong&gt; (Meta): a hybrid waveform/spectrogram model. Very strong on vocals and drums.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spleeter&lt;/strong&gt; (Deezer): older and lighter, still handy for quick 2-stem splits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MDX-Net / Roformer variants&lt;/strong&gt;: community-trained models that top many vocal benchmarks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They all take a stereo mix and predict separate stems (vocals, drums, bass, other).&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Demucs locally
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install demucs
&lt;span class="c"&gt;# two stems: vocals and everything else&lt;/span&gt;
demucs --two-stems=vocals &lt;span class="s2"&gt;"song.mp3"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output lands in &lt;code&gt;separated/htdemucs/song/&lt;/code&gt; as &lt;code&gt;vocals.wav&lt;/code&gt; and &lt;code&gt;no_vocals.wav&lt;/code&gt;. On a CPU a 4-minute song takes a few minutes; on a GPU it is seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trimming and converting with ffmpeg
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 30-second preview from the instrumental, encoded as MP3&lt;/span&gt;
ffmpeg -ss 00:00:45 -t 30 -i no_vocals.wav -codec:a libmp3lame -q:a 2 preview.mp3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When a local setup is overkill
&lt;/h2&gt;

&lt;p&gt;Installing PyTorch and model weights just to make one backing track is a lot. For one-off jobs, a hosted &lt;a href="https://videovocalremover.com/remove-background-music/" rel="noopener noreferrer"&gt;vocal remover online&lt;/a&gt; runs the same kind of model in the browser workflow: upload, wait, download the stems. That is also the easiest option to hand to non-technical teammates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quality tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Feed the model the best source you have; compression artifacts become separation artifacts.&lt;/li&gt;
&lt;li&gt;Expect some reverb bleed in the instrumental. It is usually inaudible in a full mix.&lt;/li&gt;
&lt;li&gt;For harmonies or doubled vocals, try a second pass on the &lt;code&gt;vocals&lt;/code&gt; stem.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Separation is not perfect, but for most practical uses it is now a solved, boring problem, which is exactly what you want from a tool.&lt;/p&gt;

</description>
      <category>python</category>
      <category>audio</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
