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.

[1]H. Tachibana, T. Ono, N. Ono, S.Sagayama, “Melody line estimation in homophonic music audio signals based on temporal-variability of melodic source,” in Proc. ICASSP, pp.425–428, IEEE, 2010
[2]H. Tachibana, N. Ono, S. Sagayama, “Singing voice enhancement in monaural music signals based on two-stage harmonic/percussive sound separation on multiple resolution spectrograms,” IEEE/ACM TASLP, vol. 22, no. 1, pp. 228–237, 2014
[3]H. Tachibana, Y. Mizuno, N. Ono, S. Sagayama, “A real-time audio-to-audio karaoke generation system for monaural recordings based on singing voice suppression and key conversion techniques”, Journal of Information Processing, vol. 24, no. 3, pp. 470-482, Information Processing Society of Japan, 2016

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py2shpss, version 0.1.0a3
Filename, size File type Python version Upload date Hashes
Filename, size py2shpss-0.1.0a3.tar.gz (41.8 kB) File type Source Python version None Upload date Hashes View
Filename, size py2shpss-0.1.0a3-py3-none-any.whl (6.6 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page