Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
b6a0434a
"git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "f247c86dc054956f41b4a2a2dfb5be128d10d80c"
Unverified
Commit
b6a0434a
authored
Sep 26, 2021
by
nateanl
Committed by
GitHub
Sep 26, 2021
Browse files
Add equations to MVDR docstring (#1789)
parent
78d41d57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
4 deletions
+31
-4
torchaudio/transforms.py
torchaudio/transforms.py
+31
-4
No files found.
torchaudio/transforms.py
View file @
b6a0434a
...
@@ -1560,16 +1560,43 @@ class PSD(torch.nn.Module):
...
@@ -1560,16 +1560,43 @@ class PSD(torch.nn.Module):
class
MVDR
(
torch
.
nn
.
Module
):
class
MVDR
(
torch
.
nn
.
Module
):
"""MVDR module that performs MVDR beamforming with Time-Frequency masks.
"""
Minimum Variance Distortionless Response (
MVDR
)
module that performs MVDR beamforming with Time-Frequency masks.
Based on https://github.com/espnet/espnet/blob/master/espnet2/enh/layers/beamformer.py
Based on https://github.com/espnet/espnet/blob/master/espnet2/enh/layers/beamformer.py
We provide three solutions of MVDR beamforming. One is based on *reference channel selection*
We provide three solutions of MVDR beamforming. One is based on *reference channel selection*
[:footcite:`souden2009optimal`].
[:footcite:`souden2009optimal`]
(``solution=ref_channel``)
.
The other two solutions are based on the steering vector. We apply either *eigenvalue decomposition*
.. math::
\\
textbf{w}_{
\\
text{MVDR}}(f) =
\
\\
frac{{{
\\
bf{
\\
Phi}_{
\\
textbf{NN}}^{-1}}(f){
\\
bf{
\\
Phi}_{
\\
textbf{SS}}}}(f)}
\
{
\\
text{Trace}({{{
\\
bf{
\\
Phi}_{
\\
textbf{NN}}^{-1}}(f)
\\
bf{
\\
Phi}_{
\\
textbf{SS}}}(f))}}
\\
bm{u}
where :math:`
\\
bf{
\\
Phi}_{
\\
textbf{SS}}` and :math:`
\\
bf{
\\
Phi}_{
\\
textbf{NN}}` are the covariance
\
matrices of speech and noise, respectively. :math:`
\\
bf{u}` is an one-hot vector to determine the
\
reference channel.
The other two solutions are based on the steering vector (``solution=stv_evd`` or ``solution=stv_power``).
.. math::
\\
textbf{w}_{
\\
text{MVDR}}(f) =
\
\\
frac{{{
\\
bf{
\\
Phi}_{
\\
textbf{NN}}^{-1}}(f){
\\
bm{v}}(f)}}
\
{{
\\
bm{v}^{
\\
mathsf{H}}}(f){
\\
bf{
\\
Phi}_{
\\
textbf{NN}}^{-1}}(f){
\\
bm{v}}(f)}
where :math:`
\\
bm{v}` is the acoustic transfer function or the steering vector.
\
:math:`.^{
\\
mathsf{H}}` denotes the Hermitian Conjugate operation.
We apply either *eigenvalue decomposition*
[:footcite:`higuchi2016robust`] or the *power method* [:footcite:`mises1929praktische`] to get the
[:footcite:`higuchi2016robust`] or the *power method* [:footcite:`mises1929praktische`] to get the
steering vector from the PSD matrices.
steering vector from the PSD matrix of speech.
After estimating the beamforming weight, the enhanced Short-time Fourier Transform (STFT) is obtained by
.. math::
\\
hat{
\\
bf{S}} = {
\\
bf{w}^
\\
mathsf{H}}{
\\
bf{Y}}, {
\\
bf{w}}
\\
in
\\
mathbb{C}^{M
\\
times F}
where :math:`
\\
bf{Y}` and :math:`
\\
hat{
\\
bf{S}}` are the STFT of the multi-channel noisy speech and
\
the single-channel enhanced speech, respectively.
For online streaming audio, we provide a *recursive method* [:footcite:`higuchi2017online`] to update the
For online streaming audio, we provide a *recursive method* [:footcite:`higuchi2017online`] to update the
PSD matrices of speech and noise, respectively.
PSD matrices of speech and noise, respectively.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment