Skip to content

Parameter name waveform in SlidingWindowCmn does not match parameter name specgram in F.sliding_window_cmn #1858

@Bomme

Description

@Bomme

🐛 Describe the bug

transforms.SlidingWindowCmn is basically a wrapper around functional.sliding_window_cmn.

    def forward(self, waveform: Tensor) -> Tensor:
        r"""
        Args:
            waveform (Tensor): Tensor of audio of dimension `(..., time)`.
        Returns:
            Tensor: Tensor of audio of dimension `(..., time)`.
        """
        cmn_waveform = F.sliding_window_cmn(
            waveform, self.cmn_window, self.min_cmn_window, self.center, self.norm_vars)
        return cmn_waveform

In #1347 the parameter name for functional.sliding_window_cmn was changed from waveform to specgram. transforms.SlidingWindowCmn was not updated.

I guess, SlidingWindowCmn should be updated accordingly. This would be a breaking change.

Versions

torchaudio 0.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions