vak.transforms.transforms#

Classes

AddChannel([channel_dim])

Add a "channel" dimension to a tensor.

PadToWindow(window_size[, padval, ...])

pad a 1d or 2d array so that it can be reshaped into consecutive windows of specified size

StandardizeSpect([mean_freqs, std_freqs, ...])

transform that standardizes spectrograms so they are all on the same scale, by subtracting off the mean and dividing by the standard deviation from a 'fit' set of spectrograms.

ToFloatTensor()

convert Numpy array to torch.FloatTensor.

ToLongTensor()

convert Numpy array to torch.LongTensor.

ViewAsWindowBatch(window_width)

return view of a 1d or 2d array as a batch of non-overlapping windows