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

Error using the shape of spectrogram #20

Open
haojun opened this issue Sep 29, 2019 · 4 comments
Open

Error using the shape of spectrogram #20

haojun opened this issue Sep 29, 2019 · 4 comments

Comments

@haojun
Copy link

haojun commented Sep 29, 2019

E.g, line 62 in spec_augment_tensorflow.py:
'''
fbank_size = tf.shape(spectrogram)
n, v = fbank_size[1], fbank_size[2]
'''
And 'n' is used as the length of time, and 'v' is used as the length of frequency.

But in spec_augment_test_TF.py, the re-shaped mel_spectrogram from librosa should be (-1, n_mels, t, 1), which means fbank_size[1] is actually the length of frequency and fbank_size[2] is the length of time.

Was I wrong or did I miss something?

@Jxu-Thu
Copy link

Jxu-Thu commented Dec 30, 2019

I have the same question about it

@JunenuJ
Copy link

JunenuJ commented Mar 25, 2020

Hi, do you solve this question?

@philippgovernale
Copy link

To me it looks like all the dimensions are in the wrong order for the tensorflow script at least. For me the script does the time warp on the frequency axis for instance. An easy fix I think could be to do a transpose of the spectrogram, pass it to the program and then transpose it again, though I haven't tried it

@philippgovernale
Copy link

philippgovernale commented Feb 9, 2022

I have uploaded a gist that swaps all the dimensions here

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

4 participants