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.
\[\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