Created
February 9, 2017 02:11
-
-
Save MasazI/ba314ae95ee156b1db364eacfce20f5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# signal is audio time series data. | |
# bands mel power spec dim axis 0. | |
y_harmonic, y_percussive = librosa.effects.hpss(signal) | |
S_harmonic = librosa.feature.melspectrogram(y_harmonic, n_mels=bands, sr=sample_rate) | |
S_percussive = librosa.feature.melspectrogram(y_percussive, n_mels=bands, sr=sample_rate) | |
log_Sh = librosa.logamplitude(S_harmonic, ref_power=np.max) | |
log_Sp = librosa.logamplitude(S_percussive, ref_power=np.max) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment