-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
DeepAFx-ST/deepafx_st/data/dataset.py
Lines 229 to 246 in 49bd0c8
# ------------------------ Target audio ---------------------- | |
# use the same augmented audio clip, add different random EQ and compressor | |
target_audio_corrupt = input_audio_aug.clone() | |
# apply frequency and dynamic range corrpution (expander) | |
if self.freq_corrupt and torch.rand(1).sum() < 0.75: | |
target_audio_corrupt = augmentations.frequency_corruption( | |
[target_audio_corrupt], self.sample_rate | |
)[0] | |
# peak normalize again before passing through dynamic range compressor | |
input_audio_corrupt /= input_audio_corrupt.abs().max() | |
input_audio_corrupt *= 10 ** (-12.0 / 20) # with min 3 dBFS headroom | |
if self.drc_corrupt and torch.rand(1).sum() < 0.75: | |
target_audio_corrupt = augmentations.dynamic_range_compression( | |
[target_audio_corrupt], self.sample_rate | |
)[0] |
Metadata
Metadata
Assignees
Labels
No labels