import librosa import matplotlib.pyplot as plt import numpy as np
x, sr = librosa.load("traliesig.mp3", sr=44100) S = librosa.stft(x, hop_length=256) plt.imshow(np.abs(S)[0:500, :], cmap='gray_r') plt.gca().invert_yaxis()