nnAudio.utils.downsampling_by_2

nnAudio.utils.downsampling_by_2(x, filterKernel)

A helper function that downsamples the audio by half. It is used in CQT2010 and CQT2010v2

Parameters
  • x (torch.Tensor) – The input waveform in torch.Tensor type with shape (batch, 1, len_audio)

  • filterKernel (str) – Filter kernel in torch.Tensor type with shape (1, 1, len_kernel)

Returns

The downsampled waveform

Return type

torch.Tensor

Examples

>>> x_down = downsampling_by_2(x, filterKernel)