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

STFT.inverse() could not work correct under batch operations #100

Closed
mcw519 opened this issue Aug 6, 2021 · 4 comments
Closed

STFT.inverse() could not work correct under batch operations #100

mcw519 opened this issue Aug 6, 2021 · 4 comments

Comments

@mcw519
Copy link
Contributor

mcw519 commented Aug 6, 2021

Hi,

I tried the STFT and its inverse function found that could only be worked correct under batch size is 1.
Looks like more than 1 batch size, the batch audio would be merged together.
Is any idea for this issue?

Thanks.

@mcw519
Copy link
Contributor Author

mcw519 commented Aug 6, 2021

Simple code to reproduce it.

image

@mcw519
Copy link
Contributor Author

mcw519 commented Aug 6, 2021

Hi,

I found that the error happen inside the extend_fbins()
I changed this line:
X_upper = torch.flip(X[:,1:-1],(0,1))
to
X_upper = X[:,1:-1].flip(1)
and it worked!

image

@KinWaiCheuk
Copy link
Owner

Hi,

I found that the error happen inside the extend_fbins()
I changed this line:
X_upper = torch.flip(X[:,1:-1],(0,1))
to
X_upper = X[:,1:-1].flip(1)
and it worked!

image

Oh! Good job finding and fixing the problem. I am also trying to figure out what's wrong just now, haha.
Do you mind making a pull request?

@mcw519
Copy link
Contributor Author

mcw519 commented Aug 6, 2021

sure. ^^

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

2 participants