Shortcuts

torchaudio.functional.psd

torchaudio.functional.psd(specgram: Tensor, mask: Optional[Tensor] = None, normalize: bool = True, eps: float = 1e-10) Tensor[source]

Compute cross-channel power spectral density (PSD) matrix.

This feature supports the following devices: CPU, CUDA This API supports the following properties: Autograd, TorchScript
Parameters:
  • specgram (torch.Tensor) – Multi-channel complex-valued spectrum. Tensor with dimensions (…, channel, freq, time).

  • mask (torch.Tensor or None, optional) – Time-Frequency mask for normalization. Tensor with dimensions (…, freq, time). (Default: None)

  • normalize (bool, optional) – If True, normalize the mask along the time dimension. (Default: True)

  • eps (float, optional) – Value to add to the denominator in mask normalization. (Default: 1e-15)

Returns:

The complex-valued PSD matrix of the input spectrum. Tensor with dimensions (…, freq, channel, channel)

Return type:

torch.Tensor

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources