Apply masking to a spectrogram in the time domain.

Proposed in SpecAugment .

Parameters:

• iid_masks (bool, optional) – whether to apply different masks to each example/channel in the batch. (Default: False) This option is applicable only when the input tensor is 4D.

• p (float, optional) – maximum proportion of time steps that can be masked. Must be within range [0.0, 1.0]. (Default: 1.0)

Example
>>> spectrogram = torchaudio.transforms.Spectrogram()

Tutorials using TimeMasking: