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.0a3.tar.gz
(41.8 kB
view hashes)
Built Distribution
Close
Hashes for py2shpss-0.1.0a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb142d65989565dee71690a5f08b79303047f85a3ee82c92f1980d204493ff6b |
|
MD5 | ae651c6b03147c7d8aa55b02cc104416 |
|
BLAKE2b-256 | afa44f37f5c997aecefa3958b1aafe7a39877fbb031711d78438d193118585f4 |