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.
- 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: