Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MVDR beamforming tutorial #2398

Closed
wants to merge 10 commits into from
Closed

Conversation

nateanl
Copy link
Member

@nateanl nateanl commented May 17, 2022

  • Use download_asset to download audios.
  • Replace MVDR module with new-added SoudenMVDR and RTFMVDR modules.
  • Benchmark performances of F.rtf_evd and F.rtf_power for RTF computation.
  • Visualize the spectrograms and masks.

examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@nateanl has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@@ -1,32 +1,45 @@
"""
MVDR with torchaudio
====================
MVDR Beamforming with TorchAudio
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been feeling with TorchAudio is redundant.
Can we rephrase it to <Task> with MVDR Beamforming?

From the content of the tutorial, I think Noise reduction with MVDR Beamforming is a good title.

waveform_clean, sr2 = torchaudio.load(SAMPLE_CLEAN)
assert sr == sr2 == SAMPLE_RATE
# The mixture waveform is a combination of clean and noise waveforms
waveform_noise = waveform_mix - waveform_clean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part felt unintuitive to me.
If it were waveform_mix = waveform_clean + waveform_noise then it makes more sense.
Can we create another asset and fetch it in the same way as the rest?

magnitude = stft.abs()
spectrogram = 20 * torch.log10(magnitude + 1e-8).numpy()
figure, axis = plt.subplots(1, 1)
img = axis.imshow(spectrogram, cmap="nipy_spectral", vmin=-100, vmax=0, origin="lower", aspect="auto")
Copy link
Collaborator

@mthrok mthrok May 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The custom colormap is cool, but can we use the default viridis?
It is designed so that it is easy for people with color blindness to understand the plot.

See the story behind the development https://bids.github.io/colormap/

@facebook-github-bot
Copy link
Contributor

@nateanl has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mthrok mthrok added this to the v0.12 milestone May 24, 2022
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/mvdr_tutorial.py Outdated Show resolved Hide resolved
nateanl and others added 2 commits June 1, 2022 20:35
Co-authored-by: Caroline Chen <carolinechen@fb.com>
Co-authored-by: Caroline Chen <carolinechen@fb.com>
@facebook-github-bot
Copy link
Contributor

@nateanl has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

Hey @nateanl.
You merged this PR, but labels were not properly added. Please add a primary and secondary label (See https://github.com/pytorch/audio/blob/main/.github/process_commit.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants