Shortcuts

torchaudio.functional.apply_beamforming

torchaudio.functional.apply_beamforming(beamform_weights: Tensor, specgram: Tensor) Tensor[source]

Apply the beamforming weight to the multi-channel noisy spectrum to obtain the single-channel enhanced spectrum.

This feature supports the following devices: CPU, CUDA This API supports the following properties: Autograd, TorchScript
\[\hat{\textbf{S}}(f) = \textbf{w}_{\text{bf}}(f)^{\mathsf{H}} \textbf{Y}(f) \]

where \(\textbf{w}_{\text{bf}}(f)\) is the beamforming weight for the \(f\)-th frequency bin, \(\textbf{Y}\) is the multi-channel spectrum for the \(f\)-th frequency bin.

Parameters:
  • beamform_weights (Tensor) – The complex-valued beamforming weight matrix. Tensor of dimension (…, freq, channel)

  • specgram (Tensor) – The multi-channel complex-valued noisy spectrum. Tensor of dimension (…, channel, freq, time)

Returns:

The single-channel complex-valued enhanced spectrum.

Tensor of dimension (…, freq, time)

Return type:

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