pytorch / pytorch/audio

[docs] Strange default window argument wording in MelSpectrogram

Open
#234 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
799
Avg merge
58m
Merged PRs (30d)
3

Description

https://pytorch.org/audio/transforms.html?highlight=melspectrogram#torchaudio.transforms.MelSpectrogram:

torchaudio.transforms.MelSpectrogram(sample_rate=16000, n_fft=400, win_length=None, hop_length=None, f_min=0.0, f_max=None, pad=0, n_mels=128, window_fn=<built-in method hann_window of type object>, wkwargs=None)

Very strange wording: <built-in method hann_window of type object>

If it's for torch.hann_window, having it verbatim is clearer

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the torchaudio.transforms.MelSpectrogram entry in the linked transforms documentation and inspect how the window_fn default is rendered. Update the displayed wording so it clearly identifies torch.hann_window, then verify the generated documentation shows the corrected default.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.