Skip to content

Faulty melspectrogram calculation #51

@raraz15

Description

@raraz15

https://github.com/MTG/mtg-jamendo-dataset/blob/master/scripts/melspectrograms.py

There is a faulty multiplication during power conversion which can complicate things for unaware users.

Line 45, Will create a power mel-spectrogram (magnitude squared, let's denote it by mag_spec^2)
Line 46, amp2db = UnaryOperator(type='lin2db', scale=2) applies 2*(10*log10(mag_spec^2))

However, since the mag_spec was already squared in Line 45 we have an additional multiplication by 2. When dynamic range is important it could be problematic. See the figure attached.

Line 62 says Duration for the Choi's VGG model.

Choi's kapre also suffers from the same issue. Some researchers are aware of it (can provide a paper) but many others are not.

faulty_melspec

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions