Skip to content

Commit

Permalink
Update docs for Normalize and Limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed Sep 30, 2024
1 parent c5a12e4 commit dded985
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions audiomentations/augmentations/limiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions docs/waveform_transforms/normalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit dded985

Please sign in to comment.