Source code for audaugio.augmentation.pitch_shift
import librosa
from .augmentation_base import AugmentationBase
[docs]class PitchShiftAugmentation(AugmentationBase):
"""
Pitch shift a signal by half-steps without changing the duration.
"""
def __init__(self, steps):
super().__init__(replaces=False)
self.steps = steps