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.0a2.tar.gz
(41.1 kB
view hashes)
Built Distribution
Close
Hashes for py2shpss-0.1.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07cd98632113ae04637ad2a9abb5b2b7cb2dc0cb8a0a657b1c4e83073d51d6bb |
|
MD5 | 2610c6e54569bf4e9b7b3c360a7a8178 |
|
BLAKE2b-256 | 1a940972d1c248c019722e89b4ec1f1e0ebf8e82c5c33338a326340fe62ac7d1 |