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

An issue with FrequencyMaskingAug #258

Closed
robolamp opened this issue Dec 3, 2021 · 0 comments
Closed

An issue with FrequencyMaskingAug #258

robolamp opened this issue Dec 3, 2021 · 0 comments

Comments

@robolamp
Copy link
Contributor

robolamp commented Dec 3, 2021

Hello!

Today I found out that Mel Spectrogram Frequency augmentation (FrequencyMaskingAug) defined here: https://github.com/makcedward/nlpaug/blob/master/nlpaug/augmenter/spectrogram/frequency_masking.py#L8
is applying only to the beginning of the spectrogram. For some reason, the length of this mask was equal to the number of mel frequency channel instead of full length of the audio.

I suppose that it is caused because of using len() function instead of data.shape[1] do determine number of time points of the audio in this line:
https://github.com/makcedward/nlpaug/blob/master/nlpaug/augmenter/spectrogram/spectrogram_augmenter.py#L53

UPD: I'm suggesting a small PR which is fixing this problem (ofc if I correctly understood what's happening there).

makcedward added a commit that referenced this issue Dec 21, 2021
makcedward added a commit that referenced this issue Dec 21, 2021
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