Created
April 26, 2020 12:19
-
-
Save pragatibaheti/02119fcaa664ab30b78cc1a6d282b6a5 to your computer and use it in GitHub Desktop.
This file contains 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
#min = minimum value for each row of the vector signal | |
#max = maximum value for each row of the vector signal | |
def normalize(x, axis=0): | |
return sklearn.preprocessing.minmax_scale(x, axis=axis) | |
#Plotting the Spectral Centroid along the waveform | |
librosa.display.waveplot(x, sr=sr, alpha=0.4) | |
plt.plot(t, normalize(spectral_centroids), color='r') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment