Skip to main content

A python implementation of two-stage HPSS (a singing voice extraction method)

Project description

Build Status

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


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)

Uploaded Source

Built Distribution

py2shpss-0.1.0a1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page