python把多个人声分离_python音轨分离神器

春季的时候,孩子小学要有个国学的演出活动,班主任想让班级孩子集体朗诵<诗经>片断,但需要伴奏音乐.想把爱奇艺的视频下载下来,取其中的背景音乐.但是不知道怎么下载,所以就找到了我(家长里唯一从事电脑相关工作的).下载很简单,我如you-get就搞定了,视频音频我也给分离出来了.但是老师还有个要求,就是要把音乐里的人声和乐器伴奏声分离出来(我分离出来的音频是古琴,鼓点,孩子的朗诵声在一起的).当时我找了好几个windows下的软件,调了好几个参数,也没有弄出好的效果.后来就不了了之了.

直到今天,我看到了 Spleeter这个开源工具,就又把这个事件想起来了,试了一下,效果是相当的好!

软件介绍

音轨分离软件 spleeter,只需输入一段命令就可以将音乐的人声和各种乐器声分离,支持 mp3、wav、ogg 等常见音频格式。

Spleeter 基于 TensorFlow 开发,本身运行速度非常快。分离过程可以在 GPU 或 CPU 上执行。在 GPU 上运行,如果它将音频文件分成四个音轨,可以比实时速度快 100 倍。

安装

官方文档推荐用 Conda 环境安装,如下所示:

git clone https://github.com/Deezer/spleeter

conda env create -f spleeter/conda/spleeter-cpu.yaml

其实用pip也是可以安装成功的!

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
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:[email protected]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值