import librosa import matplotlib.pyplot as plt import numpy as np
x, sr = librosa.load("tralie.mp3", sr=44100) S = librosa.stft(x) plt.imshow(np.abs(S)[0:200, ::-1].T, cmap='gray')
<matplotlib.image.AxesImage at 0x7f45b349c070>