paddlespeech.s2t.frontend.augmentor.volume_perturb module
Contains the volume perturb augmentation model.
- class paddlespeech.s2t.frontend.augmentor.volume_perturb.VolumePerturbAugmentor(rng, min_gain_dBFS, max_gain_dBFS)[source]
Bases:
AugmentorBaseAugmentation model for adding random volume perturbation.
This is used for multi-loudness training of PCEN. See
https://arxiv.org/pdf/1607.05666v1.pdf
for more details.
- Parameters
rng (random.Random) -- Random generator object.
min_gain_dBFS (float) -- Minimal gain in dBFS.
max_gain_dBFS (float) -- Maximal gain in dBFS.
Methods
__call__(x[, uttid, train])Call self as a function.
transform_audio(audio_segment)Change audio loadness.
transform_feature(spec_segment)Adds various effects to the input audo feature segment.
- transform_audio(audio_segment)[source]
Change audio loadness.
Note that this is an in-place transformation.
- Parameters
audio_segment (AudioSegmenet|SpeechSegment) -- Audio segment to add effects to.