Skip to content

Instantly share code, notes, and snippets.

@dmastropole

dmastropole/mel_powers.py

Last active Oct 16, 2019
Embed
What would you like to do?
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