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

roughness_dw time performance to be optimized? #67

Open
Antoine101 opened this issue Oct 18, 2023 · 2 comments
Open

roughness_dw time performance to be optimized? #67

Antoine101 opened this issue Oct 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Antoine101
Copy link

Hi folks,

First of all, thank you for providing access to such a great library!

I am trying to implement the calculation of psychoacoustics metrics in my sound classification machine learning project.
I want to calculate a few metrics on short snapshots of sound and as I have many sound events, it leads to a huge number of snapshots.

I noticed the calculation of roughness is significantly greater than other metrics such as loudness or sharpness. I don't know a lot about psychoacoustics or how the calculations are done.
Calculating roughness on a single short 200ms signal (=1 frame) takes around 0.5s.
Calculating roughness directly from the spectrum of this single short 200ms signal takes around 2.1s.

So my questions are:

  • Has the roughness_dw calculation script been optimized to its full potential?
  • What can explain the difference in time it takes between calculating from the time signal or the spectrum directly? I would expect the former to take less time, not more.

Many thanks

Cheers

Antoine

@wantysal
Copy link
Collaborator

wantysal commented Dec 1, 2023

Hi Antoine,

Thanks for raising this point. There is indeed a performance problem with the roughness_dw calculation.
We'll run some tests and try to figure out where the difference between the 2 functions comes from.

If you have any idea about how to improve the code, don't hesitate to share ;)

Thanks,
Salomé

@wantysal wantysal added the enhancement New feature or request label Dec 1, 2023
@Antoine101
Copy link
Author

Thank you for reviewing this issue Salomé!

Please let me know when and if you come up with an optimisation of the code.
I will have a look at it on my side as well.

Cheers

Antoine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants