Skip to content
Permalink
f3b3f10520
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
14 lines (11 sloc) 412 Bytes
from audiomentations import Compose, AddGaussianNoise, PitchShift, HighPassFilter
import librosa
import soundfile as sf
aug = Compose([
AddGaussianNoise(min_amplitude=0.001, max_amplitude=0.01, p=1.0),
PitchShift(min_semitones=0, max_semitones=0, p=1),
HighPassFilter(min_cutoff_freq=20, max_cutoff_freq=170, p=1)
])
def augmentSignal(signal, sr):
aug_sig = aug(signal, sr)
return aug_sig