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

Faulty melspectrogram calculation #51

Open
raraz15 opened this issue May 29, 2024 · 0 comments
Open

Faulty melspectrogram calculation #51

raraz15 opened this issue May 29, 2024 · 0 comments

Comments

@raraz15
Copy link

raraz15 commented May 29, 2024

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

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

1 participant