From dded9859089cd14b270d48c0bd846c15f5986cc7 Mon Sep 17 00:00:00 2001 From: iver56 Date: Mon, 30 Sep 2024 16:05:42 +0200 Subject: [PATCH] Update docs for Normalize and Limiter --- audiomentations/augmentations/limiter.py | 5 ++--- docs/waveform_transforms/normalize.md | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/audiomentations/augmentations/limiter.py b/audiomentations/augmentations/limiter.py index f1aa8ecb..b86749d5 100644 --- a/audiomentations/augmentations/limiter.py +++ b/audiomentations/augmentations/limiter.py @@ -15,15 +15,14 @@ class Limiter(BaseWaveformTransform): """ A simple audio limiter (dynamic range compression). - Note: This transform also delays the signal by a fraction of the attack time. """ supports_multichannel = True def __init__( self, - min_threshold_db: float = -24, - max_threshold_db: float = -2, + min_threshold_db: float = -24.0, + max_threshold_db: float = -2.0, min_attack: float = 0.0005, max_attack: float = 0.025, min_release: float = 0.05, diff --git a/docs/waveform_transforms/normalize.md b/docs/waveform_transforms/normalize.md index 57c703a8..f6d47542 100644 --- a/docs/waveform_transforms/normalize.md +++ b/docs/waveform_transforms/normalize.md @@ -8,6 +8,12 @@ Also known as peak normalization. # Normalize API +[`apply_to`](#apply_to){ #apply_to }: `str` • choices: `"all"`, `"only_too_loud_sounds"` +: :octicons-milestone-24: Default: `"all"`. Defines the criterion for applying the transform. + + * `"all"`: Apply peak normalization to all inputs + * `"only_too_loud_sounds"`: Apply peak normalization only to inputs where the maximum absolute peak is greater than 1 + [`p`](#p){ #p }: `float` • range: [0.0, 1.0] : :octicons-milestone-24: Default: `0.5`. The probability of applying this transform.