开源项目教程:Python音频分离器

开源项目教程:Python音频分离器

python-audio-separatorEasy to use vocal separation from CLI or as a python package, using a variety of amazing models (primarily trained by @Anjok07 as part of UVR)项目地址:https://gitcode.com/gh_mirrors/py/python-audio-separator

项目介绍

Python音频分离器(Audio Separator)是一个用于从命令行或作为Python项目依赖项轻松分离音频文件的Python包。该项目利用了由@Anjok07训练的MDX-Net模型,这些模型可在UVR(Ultimate Vocal Remover)中使用。音频分离器可以将音频文件分离成多个音轨,如乐器和歌声,适用于制作卡拉OK视频等场景。

项目快速启动

安装

你可以通过pip安装音频分离器:

pip install audio-separator

使用命令行接口(CLI)

你可以通过命令行使用音频分离器:

audio_separator [audio_file] --model_name [model_name]

例如:

audio_separator /path/to/your/audio.wav --model_name UVR_MDXNET_KARA_2

作为Python项目的依赖项

你也可以在Python项目中使用音频分离器:

from audio_separator import Separator

# 初始化分离器
separator = Separator(model_name="UVR_MDXNET_KARA_2")

# 分离音频文件
separator.separate("/path/to/your/audio.wav")

应用案例和最佳实践

制作卡拉OK视频

音频分离器最常见的用途之一是制作卡拉OK视频。通过将音频文件分离成乐器和歌声两个音轨,可以轻松地为视频添加歌词和背景音乐。

音乐制作

在音乐制作过程中,音频分离器可以帮助音乐制作人分离出特定的乐器音轨,如鼓、贝斯、钢琴等,以便进行进一步的编辑和混音。

音频分析

音频分离器还可以用于音频分析,通过分离出不同的音轨,研究人员可以更详细地分析音频的各个组成部分。

典型生态项目

Ultimate Vocal Remover (UVR)

Ultimate Vocal Remover是一个图形用户界面(GUI)工具,用于音频分离。它包含了多种预训练的模型,可以用于分离音频文件中的不同音轨。音频分离器与UVR紧密集成,提供了命令行和Python API接口。

MDX-Net

MDX-Net是由@Anjok07训练的一系列深度学习模型,专门用于音频分离。这些模型在音频分离任务中表现出色,被广泛应用于各种音频处理项目中。

通过以上教程,你可以快速上手并充分利用Python音频分离器的功能。希望这些信息对你有所帮助!

python-audio-separatorEasy to use vocal separation from CLI or as a python package, using a variety of amazing models (primarily trained by @Anjok07 as part of UVR)项目地址:https://gitcode.com/gh_mirrors/py/python-audio-separator

ReadMe Release Version beta_1.0 index.py imageMatlab.py This is more or less a wrapper for Matplotlib imaging functions such that their behavior is equivalent, in terms of colormap, aspect and so forth, to the expected behavior of Matlab's functions. sepVocal.py This script can be used to execute the desired separation. See below for an example of use of this file. SIMM.py This script implements the actual algorithm for parameter estimation. It is mainly used by sepVocal.py. tracking.py The Viterbi decoding algorithm is implemented in this script. Requirements: These scripts have been tested with Python 2.7, The packages that are required to run the scripts are pydub,ffmepg, Numpy, Spicy, Matplotlib. One can respectively find the latest versions at the following addresses: http://pydub.com/ https://ffmpeg.org http://numpy.org/ http://scipy.org/ http://matplotlib.sourceforge.net/ Notes: Prefer recent versions of the above packages, in order to avoid compatibility issues, notably for Matplotlib. Note that this latter package is not necessary for the program to run, although you might want to watch a bit what is happening! Spicy should be version 0.8+, since we use its io.wavefile module to read the wave files. We once used the audio lab module, but it would seem that it is a bit more complicated to install (with the benefit that many more file formats are allowed). Usage: The easy way to use these scripts is to run the exec package of our release version: http://www.github.com/beata_1.0 for more develop: you can run the index.py on pycharm directly. note: the output files will create under you source wav file. ContactMe Email:xlzhang14@fudan.edu.cn
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

卓炯娓

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值