Skip to content

augment.spectrogram

CropTime

class fastaudio.augment.spectrogram.CropTime(self, duration, pad_mode=)

Random crops full spectrogram to be length specified in ms by crop_duration

MaskFreq

class fastaudio.augment.spectrogram.MaskFreq(self, num_masks=1, size=20, start=None, val=None)

Google SpecAugment frequency masking from https://arxiv.org/abs/1904.08779.

MaskTime

class fastaudio.augment.spectrogram.MaskTime(self, num_masks=1, size=20, start=None, val=None)

Google SpecAugment time masking from https://arxiv.org/abs/1904.08779.

SGRoll

class fastaudio.augment.spectrogram.SGRoll(self, max_shift_pct=0.5, direction=0)

Shifts spectrogram along x-axis wrapping around to other side

Delta

class fastaudio.augment.spectrogram.Delta(self, width=9)

Creates delta with order 1 and 2 from spectrogram and concatenate with the original

TfmResize

class fastaudio.augment.spectrogram.TfmResize(self, size, interp_mode='bilinear')

Temporary fix to allow image resizing transform