paddlespeech.s2t.frontend.augmentor.speed_perturb module
Contain the speech perturbation augmentation model.
- class paddlespeech.s2t.frontend.augmentor.speed_perturb.SpeedPerturbAugmentor(rng, min_speed_rate=0.9, max_speed_rate=1.1, num_rates=3)[source]
Bases:
AugmentorBase
Augmentation model for adding speed perturbation.
Methods
__call__
(x[, uttid, train])Call self as a function.
transform_audio
(audio_segment)Sample a new speed rate from the given range and changes the speed of the given audio clip.
transform_feature
(spec_segment)Adds various effects to the input audo feature segment.
- transform_audio(audio_segment)[source]
Sample a new speed rate from the given range and changes the speed of the given audio clip.
Note that this is an in-place transformation.
- Parameters:
audio_segment (AudioSegment|SpeechSegment) -- Audio segment to add effects to.