Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Power Spectrum
from essentia.standard import Windowing, PowerSpectrum
# Compute the spectrum of a frame
w = Windowing(type='hann')
spectrum = PowerSpectrum(size=1024)
frame = audio[0:1024]
spec = spectrum(w(frame))
# Plot the spectrum of a frame
plt.plot(spec)
plt.title("Spectrum")
plt.xlabel("Frequency (Hz)")
plt.ylabel("Power")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment