Last active
October 16, 2019 23:50
-
-
Save dmastropole/5710d24eb2828b25bfb27070099f24f7 to your computer and use it in GitHub Desktop.
Power Spectrum
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
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