Last active
April 26, 2020 13:49
-
-
Save pragatibaheti/9a35badf0519c42b553513d3b60747c0 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
x, sr = librosa.load('audio.wav') | |
ipd.Audio(x, rate=sr) | |
hop_length = 512 | |
# returns normalized energy for each chroma bin at each frame. | |
chromagram = librosa.feature.chroma_stft(x, sr=sr, hop_length=hop_length) | |
plt.figure(figsize=(15, 5)) | |
librosa.display.specshow(chromagram, x_axis='time', y_axis='chroma', hop_length=hop_length, cmap='coolwarm') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment