Audio Vocal Separate logo

Audio Vocal Separate

Community
JianhuiWei7
audio-vocal-separate

【人声与背景音分离工具】基于 Demucs (htdemucs) 把一段音频/视频里的人声轨从 BGM/伴奏中分离出来,产出 vocals.wav (干净人声) + bgm.wav (无人声背景)。当用户要求分离人声/伴奏、去 BGM、提取干净人声、做声纹比对前的预处理、或要单独评估 BGM 风格时,必须立即调用此技能。

Overview

PublisherJianhuiWei7
RepositoryVideoWeaver
Skill nameaudio-vocal-separate
Stars
48
Forks
1
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by JianhuiWei7 on GitHub. Read the source before you install it.

Installation

Install the Audio Vocal Separate AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/JianhuiWei7/VideoWeaver/tree/main/skills/audio-vocal-separate
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/JianhuiWei7/VideoWeaver.git /tmp/VideoWeaver
mkdir -p .claude/skills
cp -r /tmp/VideoWeaver/skills/audio-vocal-separate .claude/skills/audio-vocal-separate
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Audio Vocal Separate in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Audio Vocal Separate on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Audio Vocal Separate is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

人声/BGM 分离 (audio-vocal-separate)

基于 Meta 开源 Demucs (htdemucs) 模型,把音频/视频文件中的人声轨从背景音乐 + 伴奏中分离开。

前置依赖

本 skill 必须在项目 uv venv 中执行:

bash

调用时统一用 .venv/bin/python:

bash
/Users/tanjie/project/claude_baseline/.venv/bin/python scripts/separate.py ...

首次运行会下载 Demucs 模型 (~80 MB) 到 ~/.cache/torch/hub/,之后离线可用。

输入

  • 任意 wav / mp3 / flac / m4a / mp4,有视频也行(只取音轨)。
  • Demucs 内部统一重采样到 44.1kHz stereo,无需提前处理。

参数

参数默认说明
--audio_path必填输入音/视频路径
--modelhtdemucshtdemucs (默认,平衡) / htdemucs_ft (更准但慢 4x) / mdx_extra
--two_stemsvocalsvocals (默认: 只出人声/BGM 两轨,最快) / all (出 4 轨: vocals/drums/bass/other)
--deviceautoauto (macOS 自动 mps, 否则 cpu) / cpu / mps / cuda
--formatwav输出格式: wav (无损) / mp3 (--mp3-bitrate 192)
--mp3_bitrate192仅当 --format mp3 生效
--session-key可选输出目录 session-key。CodeX/Claude Code 环境会自动识别,不需要传入session-key;OpenClaw 环境必须运行 session_status 获取session-key并且传入, 格式通常为 agent:{agent_id}:{session_id}。

输出

--two_stems vocals 模式(默认):

{output_dir}/
├── vocals.wav            # 干净人声 (做声纹比对 / 词级 ASR 用)
├── bgm.wav               # 无人声背景 (评估 BGM 风格 / 音乐相似度用)
└── separate_info.json    # {model, two_stems, device, durations, paths}

--two_stems all 模式:

{output_dir}/
├── vocals.wav
├── drums.wav
├── bass.wav
├── other.wav
└── separate_info.json

使用示例

分离人声 (最常用,O5.b 预处理)

bash
python scripts/separate.py --audio_path /path/to/audio.mp3
# 产物: <session_out>/audios/audio_separated/vocals.wav + bgm.wav

OpenClaw 环境需要传入 session-key:

bash
python scripts/separate.py \
  --audio_path /path/to/audio.mp3 \
  --session-key "agent:{agent_id}:{session_id}"

直接处理 video

bash
python scripts/separate.py \
  --audio_path /path/to/final.mp4

Mac M 系芯片 MPS 加速

bash
python scripts/separate.py --audio_path audio.mp3 --device mps
# 默认 auto 已会选 mps; 如要强制走 CPU 用 --device cpu

4 轨完整分离 (做音乐分析)

bash
python scripts/separate.py --audio_path audio.mp3 --two_stems all

性能参考 (macOS M-series, CPU)

输入时长htdemucs 单声道htdemucs MPS 加速
30s~25s~10s
60s~50s~20s

在 output-eval 里的典型链路

final.mp4
  → split-audio → audio.mp3
  → audio-vocal-separate (本 skill) → vocals.wav + bgm.wav
  → voiceprint-compare 比对 vocals.wav 跨 shot 一致性
  → vision-understanding / CLAP 评估 bgm.wav 风格

设计原则

  • 幂等: 若 output_dir/vocals.wav 已存在且未传 --overwrite,跳过分离直接读 sidecar
  • 失败回退: Demucs 加载/推理出错时,在 separate_info.json 标记 success=false,下游能感知

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Audio Vocal Separate AI skill do?

【人声与背景音分离工具】基于 Demucs (htdemucs) 把一段音频/视频里的人声轨从 BGM/伴奏中分离出来,产出 vocals.wav (干净人声) + bgm.wav (无人声背景)。当用户要求分离人声/伴奏、去 BGM、提取干净人声、做声纹比对前的预处理、或要单独评估 BGM 风格时,必须立即调用此技能。

Why use Audio Vocal Separate on TypingMind?

Because you install it once and use it with any model. Audio Vocal Separate is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Audio Vocal Separate in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/JianhuiWei7/VideoWeaver/tree/main/skills/audio-vocal-separate. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Audio Vocal Separate?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Audio Vocal Separate?

As many as you like. As long as a model supports skills, you can use Audio Vocal Separate with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Audio Vocal Separate AI skill free?

It is published on GitHub by JianhuiWei7. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇