Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFCC expects spectrogram to have attribute filterbank #380

Open
nielsrolf opened this issue Aug 28, 2018 · 3 comments
Open

MFCC expects spectrogram to have attribute filterbank #380

nielsrolf opened this issue Aug 28, 2018 · 3 comments

Comments

@nielsrolf
Copy link

I try to create a MFCC from a spectrogram.

Expected behaviour

It works without error.

Actual behaviour

It gives this error:

--> 345     mfcc = MFCC(spectrogram, filterbank=madmom.audio.filters.MelFilterbank)

.../music/madmom/madmom/audio/cepstrogram.py in __new__(cls, spectrogram, transform, filterbank, num_bands, fmin, fmax, norm_filters, mul, add, **kwargs)
    196 
    197         # recalculate the spec if it is filtered or scaled already
--> 198         if (spectrogram.filterbank is not None or
    199                 spectrogram.mul is not None or
    200                 spectrogram.add is not None):

AttributeError: 'Spectrogram' object has no attribute 'filterbank'

Steps needed to reproduce the behaviour

import madmom
from madmom.audio.cepstrogram import MFCC
spectrogram = madmom.audio.spectrogram.Spectrogram(audio_path, frame_size=2048, hop_size=200, fft_size=4096)
mfcc = MFCC(spectrogram)

Information about installed software

import madmom
import numpy as np
import scipy

>>> madmom.__version__
'0.16.dev0'
>>> np.__version__
'1.14.0'
>>> scipy.__version__
'1.0.0'
@superbock
Copy link
Collaborator

There's a new MFCC implementation available (#269). Unfortunately I did not have time to review and merge it. Could you try if this branch works for you?

@jomonson
Copy link

I have the latest release of madmom but I can't load cepstrogram module from madmom.audio. Am I missing some dependency or having a wrong configuration in the environment?

@superbock
Copy link
Collaborator

It is not available in any release yet, because it is not merged into the master branch yet. So you have to check out the mfccs branch. Please be aware that minor implementation details might change when it is merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants