iver56 / audiomentations

A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.
https://iver56.github.io/audiomentations/
MIT License
1.83k stars 187 forks source link

Add color noise transform #277

Closed mmxgn closed 7 months ago

mmxgn commented 1 year ago

Add AddColorNoise which lets us add noise with color (such as pink, violet, etc.) Additionally, we can A-weight the noise (and create e.g. grey noise).

codecov[bot] commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.71%. Comparing base (2befa8f) to head (0a2f5b8). Report is 11 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #277 +/- ## ========================================== + Coverage 94.59% 94.71% +0.11% ========================================== Files 45 46 +1 Lines 2129 2196 +67 ========================================== + Hits 2014 2080 +66 - Misses 115 116 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

iver56 commented 1 year ago

Nice :) Can you also add it in demo.py?

mmxgn commented 1 year ago

Nice :) Can you also add it in demo.py?

Done, also fixed support for multichannel (added test too)

mmxgn commented 1 year ago

Before merging it I want to decide on an issue:

In torch audiomentations the noise is computed once and is copied on all channels.

I would prefer if it were independently. Tell me if that's ok. Additionally, should the noise power be distributed across the channels (e.g. in stereo), or not?

Please tag whoever might have an idea on it:

(@Cangonin what are your thoughts?)

iver56 commented 1 year ago

Any thoughts on the timeline for this?

mmxgn commented 1 year ago

As soon as I have time (tm)

mmxgn commented 1 year ago

Should I merge this? I can add the documentation at a later stage.

iver56 commented 1 year ago

Here's the TODO list of things to do before I think it's ready for merge

As you say, proper documentation can be postponed until a later PR

mmxgn commented 7 months ago

@iver56 can you check it does what you want now?

iver56 commented 7 months ago

Yup, this looks solid. Good work!