Skip to content

Commit

Permalink
sample_length was removed from some transforms (when not needed)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaKh committed Dec 6, 2023
1 parent 628bb55 commit 8dc340b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tonic/audio_augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class RandomPitchShift:
Parameters:
samplerate (float): sample rate of the sample
sample_length (int): sample length in seconds
factors (float): range of desired factors for pitch shift
aug_index (int): index of the chosen factor for pitchshift. It will be randomly chosen from the desired range (if not passed while initilization)
caching (bool): if we are caching, the DiskCached dataset will dynamically pass copy index of data item to the transform (to set aug_index). Otherwise the aug_index will be chosen randomly in every call of transform
Expand All @@ -71,7 +70,6 @@ class RandomPitchShift:
"""

samplerate: float
sample_length: int
factors: list = field(
default_factory=lambda: list(range(-5, 0)) + list(range(1, 6))
)
Expand All @@ -94,7 +92,6 @@ class RandomAmplitudeScale:
Parameters:
samplerate (float): sample rate of the sample
sample_length (int): sample length in seconds
min_amp (float): minimum of the amplitude range in volts
max_amp (float): maximum of the amplitude range in volts
factors (float): range of desired factors for amplitude scaling
Expand All @@ -110,7 +107,6 @@ class RandomAmplitudeScale:
"""

samplerate: float
sample_length: float
min_amp: float = 0.058
max_amp: float = 0.159
factors: list = field(
Expand Down

0 comments on commit 8dc340b

Please sign in to comment.