espnet2.layers.augmentation.speed_perturb
Less than 1 minute
espnet2.layers.augmentation.speed_perturb
espnet2.layers.augmentation.speed_perturb(waveform, sample_rate: int, factor: float)
Speed perturbation which also changes the pitch.
Note: This function should be used with caution as it changes the signal duration.
- Parameters:
- waveform (torch.Tensor) β audio signal (β¦, time)
- sample_rate (int) β sampling rate in Hz
- factor (float) β speed factor (e.g., 0.9 for 90% speed)
- lengths (torch.Tensor) β lengths of the input signals
- Returns: perturbed signal (β¦, time)
- Return type: ret (torch.Tensor)
