vocal-remover

tsurumesoMIT活跃维护

用 PyTorch 深度神经网络从歌曲中分离人声和伴奏,输入音频后输出两条独立音轨,适合做翻唱伴奏提取或人声采样。

Vocal Remover using Deep Neural Networks

v5.1.1发布于 2024-07-12 10:47 UTC1,763star257fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
cd vocal-remover
pip install -r requirements.txt
python inference.py --input path/to/an/audio/file
硬件要求按 README 说明

README 未说明显存要求;支持纯 CPU 运行(不加 --gpu),加 --gpu 0 可指定 GPU 加速,但未列出支持的 GPU 厂商或型号。

纯 CPU 可运行
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于深度神经网络的伴奏提取工具,从歌曲中分离出纯伴奏与人声

用 PyTorch 深度神经网络从歌曲中分离人声和伴奏,输入音频后输出两条独立音轨,适合做翻唱伴奏提取或人声采样。

核心能力

  • 用深度 U-Net 类模型分离人声与伴奏
  • 输出 *_Instruments.wav 和 *_Vocals.wav 两个文件
  • 支持 --tta 测试时增强提升分离质量
  • 支持 --postprocess 按人声音量掩蔽伴奏
  • 提供 train.py 用自建数据集训练模型

容易踩的坑

需先按 PyTorch 官网指引自行安装 PyTorch,requirements.txt 不含它;--postprocess 是实验性功能,出问题应关闭;训练需按 instruments/ 与 mixtures/ 目录结构准备数据集。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v5.1.1
  1. v6.0.0b4pre-release2024-07-23 · 2024-07-23 18:19 UTC
    查看更新说明

    This will probably be the final release, except for bug fixes. Thanks to all who have expressed interest in vocal-remover!!!

    Note

    • Add evaluation script
    • Refactor
  2. v6.0.0b3pre-release2024-07-14 · 2024-07-14 19:26 UTC
    查看更新说明

    Note

    • Phase estimation with complex mask
    • Update the model architecture
    • Update the pre-trained model

    Evaluation result on DSD100

    SDR in dB

    VersionInstrumentsVocals
    v4.0.015.7785.214
    v5.1.115.8585.294
    v6.0.0b316.0305.614
  3. v5.1.1最新正式版2024-07-12 · 2024-07-12 10:47 UTC

    Note

  4. v6.0.0b2pre-release2023-11-30 · 2023-11-30 10:42 UTC
    查看更新说明

    [!WARNING] This is a beta release.

    Note

    • Implement bounded mask
    • Update the pre-trained model
  5. v5.1.02023-11-30 · 2023-11-30 10:30 UTC
    查看更新说明

    Note

    • Fix a bug that causes a large disk load on online data loading

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    vocal-remover

    Release Release

    This is a deep-learning-based tool for extracting the instrumental track from your songs.

    Installation

    Getting vocal-remover

    Download the latest version from here.

    Install PyTorch

    See: GET STARTED

    Install the other packages

    cd vocal-remover
    pip install -r requirements.txt
    

    Usage

    The following command separates the input into instrumental and vocal tracks. They are saved as *_Instruments.wav and *_Vocals.wav.

    Run on CPU

    python inference.py --input path/to/an/audio/file
    

    Run on GPU

    python inference.py --input path/to/an/audio/file --gpu 0
    

    Advanced options

    The --tta option performs Test-Time Augmentation to improve separation quality.

    python inference.py --input path/to/an/audio/file --tta --gpu 0
    

    The --postprocess option masks the instrumental track based on the vocal volume to improve separation quality.

    [!WARNING] This is an experimental feature. If you encounter any problems with this option, please disable it.

    python inference.py --input path/to/an/audio/file --postprocess --gpu 0
    

    Train your own model

    Place your dataset

    path/to/dataset/
      +- instruments/
      |    +- 01_foo_inst.wav
      |    +- 02_bar_inst.mp3
      |    +- ...
      +- mixtures/
           +- 01_foo_mix.wav
           +- 02_bar_mix.mp3
           +- ...
    

    Train a model

    python train.py --dataset path/to/dataset --mixup_rate 0.5 --reduction_rate 0.5 --gpu 0
    

    References