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.0a4.tar.gz
(41.6 kB
view details)
Built Distribution
File details
Details for the file py2shpss-0.1.0a4.tar.gz
.
File metadata
- Download URL: py2shpss-0.1.0a4.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b41f497d4577defb947e615fef86cdaf82ab7c66c8078a7fd536b6380de397f |
|
MD5 | 2a02b0b0876fe69442092f21c1839151 |
|
BLAKE2b-256 | a428e763c6296511c4cdafe36ad1e8de866805997938b7a29b513ce9a033fd98 |
File details
Details for the file py2shpss-0.1.0a4-py3-none-any.whl
.
File metadata
- Download URL: py2shpss-0.1.0a4-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2969249bbecbb5e8dd98292a39de0c439837632d221f19d356a7647c63a7483b |
|
MD5 | c4ff1d917dd1af4cd4c27c932beac378 |
|
BLAKE2b-256 | 869fb8809c91bb900db4a0d5e02540e69929e9d2f6e4a3d023945ed11482d34c |