Skip to content

Commit

Permalink
bug fixed in test
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaKh committed Dec 6, 2023
1 parent 8dc340b commit f57d4d5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/test_audio_augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_random_pitch_shift():
sl = 1 # sample length
data = np.random.rand(1, sr * sl)

aug = RandomPitchShift(sample_length=sl, samplerate=sl)
aug = RandomPitchShift(samplerate=sr)
pitch_shifted = aug(data)

assert pitch_shifted is not data
Expand All @@ -92,9 +92,7 @@ def test_random_amplitude_scale():
data = np.ones((1, sr * sl))
min_amp, max_amp = 0.05, 0.15

aug = RandomAmplitudeScale(
sample_length=sl, samplerate=sl, min_amp=min_amp, max_amp=max_amp
)
aug = RandomAmplitudeScale(samplerate=sr, min_amp=min_amp, max_amp=max_amp)
amp_scaled = aug(data)

assert amp_scaled is not data
Expand Down

0 comments on commit f57d4d5

Please sign in to comment.