audio icon indicating copy to clipboard operation
audio copied to clipboard

Centroid frequency limits

Open jacobjwebber opened this issue 3 years ago • 5 comments

It was mentioned in #1059 that it might be good to support a narrow range of frequencies to find the spectral centroid. This is an attempt at that.

Apologies if this is not correct, it is my first attempt at a PR for pytorch/audio!

jacobjwebber avatar Dec 03 '21 20:12 jacobjwebber

Hi @jacobjwebber!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar Dec 03 '21 20:12 facebook-github-bot

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

facebook-github-bot avatar Dec 03 '21 21:12 facebook-github-bot

CircleCI is not getting triggered. Let me close and reopen the PR to see if it helps.

mthrok avatar Dec 03 '21 22:12 mthrok

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

facebook-github-bot avatar Dec 03 '21 22:12 facebook-github-bot

Hi @mthrok, sorry for taking a little while to get back to you.

I added a test in batch_consistency_test.py for the new behaviour -- I am not sure if this is the right place.

The basic idea of why you would want this is that you might want the centroid of a specific range of frequencies. I used this recently because I only wanted the centroid of voiced frequencies.

A downside of accepting this is that it adds features that aren't present in librosa. I think this transform was initially intended to clone a function from that library

jacobjwebber avatar Dec 06 '21 13:12 jacobjwebber