Skip to content

Instantly share code, notes, and snippets.

@pragatibaheti
Last active April 26, 2020 13:49
Show Gist options
  • Save pragatibaheti/9a35badf0519c42b553513d3b60747c0 to your computer and use it in GitHub Desktop.
Save pragatibaheti/9a35badf0519c42b553513d3b60747c0 to your computer and use it in GitHub Desktop.
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