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 percussive 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(samprate = sr)
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.0a1.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for py2shpss-0.1.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abf28353eb2892065e14dbad7a23caa36541df5a5bedca2dcba46272b0a93bf0 |
|
MD5 | f67ab68bdc9965d9e9e844bf0b30fb57 |
|
BLAKE2b-256 | f86dc2db116916f5dc5f1e9c2ae6201d13b24489b7276b10786973990bdc59a7 |