Skip to main content

Demucs 人声分离命令行工具,支持伴奏导出与轻量音质增强

Project description

novacal

中文 | English

novacal 是一个基于 demucs 的命令行人声分离工具。

  • 输入一首歌
  • 导出伴奏 no_vocals
  • 支持 wav / mp3 / m4a
  • 支持一键轻量音质增强
  • 支持实时进度输出

中文

功能

  • 人声分离:调用 demucs 提取 no_vocals
  • 音质增强:可选 --enhance
  • 质量预设:fast / balanced / best
  • 设备选择:cpu / mps / cuda / auto
  • 实时日志:避免终端看起来卡住

安装

1. 安装系统依赖

macOS:

brew install ffmpeg
brew install libsndfile

2. 安装 novacal

pip install novacal

如果你是本地源码开发:

pip install -e .

快速开始

最简单用法:

novacal "song.mp3"

开启音质增强:

novacal "song.mp3" --enhance

更高质量:

novacal "song.mp3" --quality best --enhance

导出 mp3:

novacal "song.mp3" -o "song_no_vocals.mp3" --enhance

如果命令不可用,也可以这样运行:

python -m novacal "song.mp3" --enhance

常用参数

  • --quality fast|balanced|best:质量预设
  • --shifts N:手动指定 demucs shifts
  • --device cpu|mps|cuda|auto:计算设备
  • --float32:更稳但可能更慢
  • --enhance:导出时做轻量后处理
  • --debug:打印完整错误堆栈

输出格式

支持以下输出后缀:

  • .wav
  • .mp3
  • .m4a

默认输出命名:

  • 原文件名_no_vocals.wav

不支持

  • .ncm

.ncm 是加密格式,不是标准音频容器,demucs 和 ffmpeg 无法直接处理。

常见问题

1. 提示缺少 ffmpeg

请先安装:

brew install ffmpeg

2. 提示 torchaudio 没有可用 backend

请安装:

brew install libsndfile
pip install -U soundfile

3. 运行很慢

  • 第一次运行可能需要初始化模型
  • best 会更慢,但通常更干净
  • Apple Silicon 可尝试 --device mps

发布

构建:

python -m build

上传:

python -m twine upload dist/*

English

novacal is a command-line vocal separation tool powered by demucs.

  • Input a song
  • Export the accompaniment as no_vocals
  • Support wav / mp3 / m4a
  • Optional one-click enhancement
  • Real-time progress output

Features

  • Vocal separation with demucs
  • Optional enhancement via --enhance
  • Quality presets: fast / balanced / best
  • Device selection: cpu / mps / cuda / auto
  • Streaming logs for better CLI feedback

Installation

1. Install system dependencies

macOS:

brew install ffmpeg
brew install libsndfile

2. Install novacal

pip install novacal

For local development:

pip install -e .

Quick Start

Basic usage:

novacal "song.mp3"

Enable enhancement:

novacal "song.mp3" --enhance

Use better quality:

novacal "song.mp3" --quality best --enhance

Export mp3:

novacal "song.mp3" -o "song_no_vocals.mp3" --enhance

If the shell command is not available, use:

python -m novacal "song.mp3" --enhance

Common Options

  • --quality fast|balanced|best
  • --shifts N
  • --device cpu|mps|cuda|auto
  • --float32
  • --enhance
  • --debug

Supported Output Formats

  • .wav
  • .mp3
  • .m4a

Default output:

  • original_name_no_vocals.wav

Unsupported

  • .ncm

.ncm is an encrypted format, not a standard audio container, so it cannot be processed directly by demucs or ffmpeg.

Build and Publish

Build:

python -m build

Upload:

python -m twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

novacal-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

novacal-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file novacal-0.1.0.tar.gz.

File metadata

  • Download URL: novacal-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for novacal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1235446b5b8d2bbbf39153a8a4305d8354ab353a0fcdaffec11bf6f5c4b8e11c
MD5 aff254c91f277a3cce03c1f8980bd1c5
BLAKE2b-256 99a9f6e05541d20979655f201c044463c1ff9253a814b905c993748cb41a9a80

See more details on using hashes here.

File details

Details for the file novacal-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: novacal-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for novacal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 750a4b3e1f23cdc1438c43b132a28d9d26019a5ffd5fb133a3fe292c7708449f
MD5 4c3da6371b6526828ac273b1e588ddd0
BLAKE2b-256 c086d65e9502e92d0fe35015a72336b936cadc96374e06841953c8c66bf76e73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page