Communitygithub.com

axx-KSA/nomusic

Remove background music from a video while keeping the speaker's voice, locally and for free, setting up every dependency it needs. Use when the user asks to remove or strip music, isolate vocals or speech, or keep only the voice of a video or audio file.

Qu'est-ce que nomusic ?

nomusic is a Claude Code agent skill that remove background music from a video while keeping the speaker's voice, locally and for free, setting up every dependency it needs. Use when the user asks to remove or strip music, isolate vocals or speech, or keep only the voice of a video or audio file.

Compatible avec✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/axx-KSA/claude-skill-nomusic/tree/HEAD/skills/nomusic

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

nomusic: remove music, keep the voice

Runs entirely on the user's machine. Nothing is uploaded. The video stream is copied without re-encoding. Reply in the user's language.

The user may have nothing installed except Claude Code. Do the setup yourself (Step 0), asking approval before installing system software. Never tell the user to go and set things up on their own unless an install fails.

Step 0: preflight and setup (always run first)

Detect the OS (uname -s or $env:OS / ver on Windows) and check each item. Install what is missing; tell the user in one line what you are installing and why before doing it.

NeedCheckInstall if missing
ffmpegffmpeg -versionWindows: winget install Gyan.FFmpeg (then open a new shell or add it to PATH). macOS: brew install ffmpeg. Debian/Ubuntu: sudo apt install -y ffmpeg. Fedora: sudo dnf install -y ffmpeg
Python 3.9+python3 --version (or python --version / py -3 --version on Windows)Windows: winget install Python.Python.3.12. macOS: brew install python. Linux: sudo apt install -y python3 python3-venv python3-pip
Private venv + packages<venv>/bin/audio-separator --help (Scripts\audio-separator.exe on Windows)python3 -m venv ~/.cache/nomusic/venv then <venv>/bin/python -m pip install "audio-separator[cpu]" audioread
InternetPyPI + GitHub reachableThe ~67 MB model downloads from GitHub on first run

Notes:

  • Use a venv (above) so the user's system Python is untouched; no --break-system-packages needed.
  • Package managers that need admin rights/sudo or a password: ask the user to approve or run that one command, then continue. If no package manager exists (e.g. no winget/brew), give the official download link and wait.
  • If the network blocks PyPI/GitHub, say so plainly; do not try to bypass it.
  • First run is slow (venv + model download, up to a few minutes). Later runs only take about 2x the clip length on CPU.

Method order (cheapest first)

  1. Local, free (default): audio-separator with UVR-MDX-NET-Voc_FT.
  2. ffmpeg filtering: only if (1) fails. Lower quality, cannot guarantee full music removal.
  3. Paid/external stem separation: last resort; uploads the user's file to a third party, so get explicit permission first.

If the user wants all audio removed (no voice to keep): ffmpeg -i in.mp4 -c:v copy -an out.mp4.

Steps

  1. Inspect: ffprobe -show_entries stream=codec_type,codec_name,channels,duration in.mp4.
  2. Commands:
    • Extract: ffmpeg -i in.mp4 -vn -c:a libmp3lame -q:a 2 audio.mp3
    • Separate: audio-separator audio.mp3 --model_filename UVR-MDX-NET-Voc_FT.onnx --output_dir sep --model_file_dir <models-dir> → *Vocals*.flac and *Instrumental*.flac
    • Remux: ffmpeg -i in.mp4 -i sep/<vocals>.flac -map 0:v -map 1:a -c:v copy -c:a aac -b:a 192k -shortest out.mp4
  3. Verify: spectrogram (ffmpeg -i vocals.flac -lavfi showspectrumpic=s=1000x300:legend=0 spec.png). Speech should look like separate phrases with silence between. Compare RMS with the original.
  4. Deliver the file; say you cannot listen to it, so the user should check by ear.

Gotchas

  • ModuleNotFoundError: audioread means it was not installed alongside audio-separator; install both.
  • demucs often fails in restricted networks (its weights are on a blocked host, HTTP 403). Do not bypass; audio-separator models come from GitHub.
  • Mono audio (L == R): mid/side "center channel" tricks do nothing; use the model.
  • Audio may be shorter than the video; -shortest trims to the audio, or leave the tail silent.
  • If music residue remains, try another free UVR model before suggesting anything paid.
  • Only tested on Linux; Windows/macOS commands above are standard but unverified.

Skills associés