Windows command line program for Spleeter, written in pure C, no need of Python.

Related tags

CLI c windows spleeter
Overview

SpleeterMsvcExe

GitHub release MIT licensed

1. Introduction (中文)

Release file list

SpleeterMsvcExe is a Windows command line program for Spleeter, which can be used directly.

It is written in pure C language, using ffmpeg to read and write audio files, and using Tensorflow C API to make use of Spleeter models. No need to install Python environment, and it does not contain anything related to Python.

Furthermore, SpleeterMsvcExe reduced the memory usage through segmented processing, hence it can handle single audio file over 30 minutes. Due to the length-extending process, all segments can be concatenated seamlessly.

2. Usage

Download the latest release version program, and extract.

Run the download_models.bat batch script in models folder, to automatically download and extract Spleeter model files. Or manually download the models-all.zip file in releases, and extract it to models folder (if the 16kHz models are needed, you need to run generate_16kHz.bat too).

Drag-and-drop the song.mp3 file to spleeter.exe, or execute the following command:

spleeter.exe song.mp3

It will split song.mp3 into two tracks: song.vocals.mp3 and song.accompaniment.mp3

If it reports missing DLL files, please install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 (x64) (Source).

3. Help and more examples

Usage: spleeter [options] 

Options:
    -m, --model         Spleeter model name
                        (2stems, 4stems, 5stems-16kHz, ..., default: 2stems)
    -o, --output        Output base file name
                        (in the format of filename.ext, default: )
    -b, --bitrate       Output file bit rate
                        (128k, 192000, 256k, ..., default: 256k)
    --overwrite         Overwrite when the target output file exists
    -h, --help          Display this help and exit
    -v, --version       Display program version and exit

Examples:
    spleeter -m 2stems song.mp3
    - Splits song.mp3 into 2 tracks: vocals, accompaniment
    - Outputs 2 files: song.vocals.mp3, song.accompaniment.mp3
    - Output file format is same as input, using default bitrate 256kbps

    spleeter -m 4stems -o result.m4a -b 192k song.mp3
    - Splits song.mp3 into 4 tracks: vocals, drums, bass, other
    - Outputs 4 files: result.vocals.m4a, result.drums.m4a, ...
    - Output file format is M4A, using bitrate 192kbps

    spleeter --model 5stems-16kHz --bitrate 320000 song.mp3
    - Long option example
    - Use fine-tuned model, spliting song.mp3 into 5 tracks

4. Acknowledgements

  • Thanks to Deezer for open-sourced the Spleeter project.

  • Thanks to Guillaume Vincke for bringing out the spleeterpp project. The Spleeter processing part of this project made reference to its implementation, and used the converted Spleeter model files provided by spleeterpp project.


1. 简介

Release file list

SpleeterMsvcExe 是 Spleeter 的 Windows 命令行程序,可直接运行使用。

纯 C 语言编写,使用 ffmpeg 读取和写入音频文件,使用 Tensorflow C API 调用 Spleeter 模型。无需安装 Python 环境,内部也不包含任何 Python 相关内容。

此外,SpleeterMsvcExe 还通过分段处理减少了内存占用,它可以处理长度超过 30 分钟的单个音频文件。分段时有长度扩展处理,使各分段可无缝连接,合并结果无可感知的差异。

2. 使用方法

下载最新的 release 版本程序,解压到任意位置。

执行 models 目录中的 download_models.bat 脚本自动下载并解压 Spleeter 模型文件。或手动下载 release 中的 models-all.zip 文件并解压到 models 目录中 (如果需要 16kHz 模型还需手动执行 generate_16kHz.bat)。

将 song.mp3 文件拖拽到 spleeter.exe 上,或在命令行执行

spleeter.exe song.mp3

即可将 song.mp3 分离为人声 (song.vocals.mp3) 和伴奏 (song.accompaniment.mp3) 两个音轨。

如果运行时报告缺少 DLL 文件,请安装 Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 (x64) (来源页面)。

3. 帮助和更多示例

使用: spleeter [选项] <输入文件路径>

选项:
    -m, --model         Spleeter 模型名称
                        (2stems, 4stems, 5stems-16kHz, ..., 默认值: 2stems)
    -o, --output        输出基础文件名
                        (格式为 文件名.扩展名,默认值: <输入文件路径>)
    -b, --bitrate       输出文件的比特率
                        (128k, 192000, 256k, ..., 默认值: 256k)
    --overwrite         当目标输出文件已存在时直接覆盖
    -h, --help          显示帮助文本并退出
    -v, --version       显示程序版本号并退出

示例:
    spleeter -m 2stems song.mp3
    - 将 song.mp3 分离为 2 个音轨: vocals, accompaniment (人声,伴奏)
    - 输出 2 个文件: song.vocals.mp3, song.accompaniment.mp3
    - 输出文件使用和输入相同的 MP3 格式,比特率为默认的 256kbps

    spleeter -m 4stems -o result.m4a -b 192k song.mp3
    - 将 song.mp3 分离为 4 个音轨: vocals, drums, bass, other (人声,鼓,贝斯,其它)
    - 输出 4 个文件: result.vocals.m4a, result.drums.m4a, ...
    - 输出文件使用 M4A 格式,比特率为 192kbps

    spleeter --model 5stems-16kHz --bitrate 320000 song.mp3
    - 使用长选项 (long option) 参数的示例
    - 使用最高到 16kHz 的精细模型,将 song.mp3 分离为 5 个音轨

4. 致谢

  • 感谢 Deezer 开源了 Spleeter 项目。

  • 感谢 Guillaume Vincke 带来了 spleeterpp 项目。本项目的 Spleeter 处理部分代码参考其实现,并使用了其提供的转换后的 Spleeter 模型文件。

Issues
  • How do I Export Spleeter Models for SpleeterMsvcExe to use?

    How do I Export Spleeter Models for SpleeterMsvcExe to use?

    How do I Export Spleeter Models for SpleeterMsvcExe to use? I tried to use the Python code of Export Spleeter Models mentioned in Guillaume Vincke's spleeterpp project to Export Spleeter Models for SpleeterMsvcExe to use, but SpleeterMsvcExe could not accept it! And No Error appear! Because I need F=2048 Spleeter Models to test, Thank you!

    opened by Jongan 1
Releases(v1.0)
Owner
Wudi
Wudi
led is a line-oriented text editor in command line

led is a line-oriented text editor in command line. This editor is similar to the standard program on unix systems - GNU ed. But i'm not going to make an exact clone of that program, it's just a pet project.

Artem Mironov 9 Mar 4, 2022
Add a command-line interface to any C++ program

Add a command-line interface to any C++ program

Empirical Software Solutions, LLC 402 May 10, 2022
CLIp is a clipboard emulator for a command line interface written in 100% standard C only. Pipe to it to copy, pipe from it to paste.

CLIp v2 About CLIp is a powerful yet easy to use and minimal clipboard manager for a command line environment, with no dependencies or bloat. Usage Sy

A.P. Jo. 12 Sep 18, 2021
A CLI program that helps you find classes and plan pre-requisites. Written in C++ and Python.

CourseHelper A CLI program created to help you prepare for course registration. Note: At the moment, this project is built specifically for other UCLA

Kyle Chui 1 Jan 25, 2022
Operating system in Terminal written in pure C++

terminal-OS Operating system in Terminal written in pure C++ Features: Mouse tracking Colorful print Window move/resize Hide windows to Taskbar Apps:

Egor Zheltkevich 23 Jan 7, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Clara v1.1.5 !! This repository is unmaintained. Go here for a fork that is somewhat maintained. !! A simple to use, composable, command line parser f

Catch Org 651 Apr 30, 2022
A library for interactive command line interfaces in modern C++

cli A cross-platform header only C++14 library for interactive command line interfaces (Cisco style) Features Header only Cross-platform (linux and wi

Daniele Pallastrelli 782 May 9, 2022
CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.

CLI11: Command line parser for C++11 What's new • Documentation • API Reference CLI11 is a command line parser for C++11 and beyond that provides a ri

null 2.1k May 10, 2022
Lightweight C++ command line option parser

Release versions Note that master is generally a work in progress, and you probably want to use a tagged release version. Version 3 breaking changes I

null 3.1k May 12, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Lyra A simple to use, composing, header only, command line arguments parser for C++ 11 and beyond. Obtain License Standards Stats Tests License Distri

Build Frameworks Group 337 May 8, 2022
A single header C++ library for parsing command line arguments and options with minimal amount of code

Quick Arg Parser Tired of unwieldy tools like getopt or argp? Quick Arg Parser is a single header C++ library for parsing command line arguments

null 44 Feb 21, 2022
pbr2gltf2 is a command line tool for converting PBR images to a glTF 2.0 material.

pbr2gltf2 is a command line tool for converting PBR images to a glTF 2.0 material. The tool is detecting depending on the filename, which PBR information is stored. It swizzles the images and does reassign the channels to a glTF 2.0 image. The tool stores the images plus a minimal, valid glTF 2.0 file containing the required material, textures and images.

UX3D GmbH 22 Jan 11, 2022
null 76 Apr 18, 2022
A command-line tool to display colorful distro information.

sjfetch A command-line tool to display colorful distro information.

Fikret Musk 6 Apr 6, 2022
LwSHELL is lightweight, platform independent, command line shell for embedded systems.

LwSHELL is lightweight, platform independent, command line shell for embedded systems. It targets communication with embedded systems from remote terminal to quickly send commands and the retrieve data from the device.

Tilen Majerle 47 May 6, 2022
Toybox: all-in-one Linux command line.

Toybox: all-in-one Linux command line.

Rob Landley 1.7k May 16, 2022
Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

GPUOpen Effects 164 May 3, 2022
Command-line flag parsing in C

flag.h Inspired by Go's flag module: https://pkg.go.dev/flag WARNING! The design of the library is not finished and may be a subject to change. Quick

Tsoding 34 May 1, 2022
A command line tool with no external dependencies to print information about an X server instance.

xinfo A command line tool with no external dependencies to print information about an X server instance. Building and running To build the code in thi

Jean-Michel Gorius 6 Jan 13, 2022