Skip to content

Instantly share code, notes, and snippets.

@dmastropole
Last active October 16, 2019 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmastropole/a57a7aa076d4f1db66e55193f575af7d to your computer and use it in GitHub Desktop.
Save dmastropole/a57a7aa076d4f1db66e55193f575af7d to your computer and use it in GitHub Desktop.
Mel Powers
from essentia.standard import MelBands
# Compute the mel band powers
melbands = MelBands(lowFrequencyBound=f_low,
highFrequencyBound=f_high,
inputSize=1024,
numberBands=n_bands,
type='magnitude', # We already computed the power.
sampleRate=44100)
mels = melbands(spec)
# Plot the mel band powers
plt.bar(np.arange(len(mels)), mels, align='center')
plt.title('Mel Band Powers')
plt.xlabel('Mel Bands')
plt.ylabel('Power')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment