Add RMSNormalization transform for target-level RMS normalisation (closes #176)#183
Add RMSNormalization transform for target-level RMS normalisation (closes #176)#183Shohail-Ismail wants to merge 4 commits intoiver56:mainfrom
Conversation
iver56
left a comment
There was a problem hiding this comment.
Thanks for the PR!
For consistency with the other transforms, I would like RMSNormalization to also have/support mode and p_mode arguments.
Also, let p default to 0.5 for now, so it has the same default as the others. I realize that this default might not be ideal, but consistency is good. An overall change in the default p in the future will need to be a separate effort.
|
Thanks for the feedback! Args mode and p_mode are now supported, and p defaults to 0.5 Let me know if there is anything further. |
|
Thanks for the update! I will have another look soon. I'm on vacation these days. That is what has delayed the review. Thanks for the patience |
|
Hi @iver56, I would appreciate it if you could take a look when you get the chance. Thanks! |
There was a problem hiding this comment.
I ran pytest. It gave me an error:
torch_audiomentations\augmentations\rms_normalization.py:7: in <module>
from ..utils import db_to_amplitude
E ImportError: cannot import name 'db_to_amplitude' from 'torch_audiomentations.utils' (C:\Users\iver5\Code\torch-audiomentations\torch_audiomentations\utils\__init__.py)
|
@iver56 Apologies, I'm not sure why this wasn't apparent in my pytest a month ago, but regardless I have made the changes and pytest finishes cleanly. |
|
Thanks! I will have a look |
Summary
Adds a new
RMSNormalizationtransform (subclass ofBaseWaveformTransform) that:ObjectDict(samples, sample_rate, etc.)Tests
Includes three basic tests covering:
Issue
Closes issue #176
Let me know if you’d like any further tweaks, thanks!