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

Introduce a faster overlap_and_add method #26

Merged
merged 3 commits into from Jan 17, 2022
Merged

Conversation

giamic
Copy link
Contributor

@giamic giamic commented Jan 14, 2022

This PR introduces a new overlap_and_add method, inspired by the one implemented in tensorflow (https://github.com/tensorflow/tensorflow/blob/v2.7.0/tensorflow/python/ops/signal/reconstruction_ops.py#L30-L167) , that is ~50 times faster than the previous one on a 30-seconds audio because it vectorises the code instead of making a for loop.

@mpariente
Copy link
Owner

That sounds great, thanks for your contributions !

Can you make a unit test against the loop version of OLA to stay on the safe side, please?

@giamic
Copy link
Contributor Author

giamic commented Jan 15, 2022

You are totally right! I've written the test and put it in a new file because it uses neither matlab nor octave. Let me know if you want me to change anything in it. I also took the opportunity to do some very minor rewriting of the new function.

@giamic giamic changed the title Introduce a faster overlap_add method Introduce a faster overlap_and_add method Jan 15, 2022
@mpariente
Copy link
Owner

Thanks for the test, it looks good.

Cosmetic changes to other parts of the code make the git history harder to read.
Next time, either don't make the changes, or make a separate PR for them please.

@mpariente mpariente merged commit 9ff1cfa into mpariente:master Jan 17, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants