A python implementation of two-stage HPSS (a singing voice extraction method)
Project description
A python implementation of two-stage HPSS (a singing voice extraction method)
Two-stage HPSS separates a music signal into harmonic, vocal, and pecussive components.
License
Copyright (c) 2020 Hideyuki Tachibana, MIT License
Usage
Install
pip install py2shpss
Code Example
# import
import numpy as np
import scipy.io.wavfile as wavfile
import py2shpss
# load music
sr, sig = wavfile.read("your_awesome_music.wav")
if len(sig.shape) == 2:
# mix left and right channels if stereo
sig = np.mean(sig, axis=1)
sig = sig / np.max(sig)
# process and save
twostageHPSS = py2shpss.twostageHPSS()
harmonic, vocal, percussive = twostageHPSS(sig)
wavfile.write("vocal.wav", sr, vocal)
Citation
Two-stage HPSS was proposed in following papers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py2shpss-0.1.0a0.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for py2shpss-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41a0db8290d3f0c32a7a604859bb29788a6c383fff7526bb890ecca9db740b2d |
|
MD5 | b93ff29e3d632a22a6816bc25ae46a73 |
|
BLAKE2b-256 | 13aff3ce952a40ab122d3f600d879c8abdfb80f17c3a9f5cb0b172104f2a9bbb |