diff --git a/docs/source/functional.rst b/docs/source/functional.rst index 5ff8ec695e..284153c7fd 100644 --- a/docs/source/functional.rst +++ b/docs/source/functional.rst @@ -86,10 +86,6 @@ complex_norm .. autofunction:: complex_norm -magphase --------- - -.. autofunction:: magphase :hidden:`Filtering` ~~~~~~~~~~~~~~~~~~~ diff --git a/torchaudio/functional/__init__.py b/torchaudio/functional/__init__.py index fc3173cd21..494f1bdc23 100644 --- a/torchaudio/functional/__init__.py +++ b/torchaudio/functional/__init__.py @@ -12,7 +12,6 @@ detect_pitch_frequency, inverse_spectrogram, griffinlim, - magphase, mask_along_axis, mask_along_axis_iid, mu_law_encoding, @@ -65,7 +64,6 @@ 'DB_to_amplitude', 'detect_pitch_frequency', 'griffinlim', - 'magphase', 'mask_along_axis', 'mask_along_axis_iid', 'mu_law_encoding', diff --git a/torchaudio/functional/functional.py b/torchaudio/functional/functional.py index 1444ecef07..1340216f40 100644 --- a/torchaudio/functional/functional.py +++ b/torchaudio/functional/functional.py @@ -30,7 +30,6 @@ "mu_law_decoding", "complex_norm", "angle", - "magphase", "phase_vocoder", 'mask_along_axis', 'mask_along_axis_iid', @@ -771,31 +770,6 @@ def angle( return torch.atan2(complex_tensor[..., 1], complex_tensor[..., 0]) -@_mod_utils.deprecated( - "Please convert the input Tensor to complex type with `torch.view_as_complex` then " - "use `torch.abs` and `torch.angle`. " - "Please refer to https://github.com/pytorch/audio/issues/1337 " - "for more details about torchaudio's plan to migrate to native complex type.", - version="0.11", -) -def magphase( - complex_tensor: Tensor, - power: float = 1.0 -) -> Tuple[Tensor, Tensor]: - r"""Separate a complex-valued spectrogram with shape `(..., 2)` into its magnitude and phase. - - Args: - complex_tensor (Tensor): Tensor shape of `(..., complex=2)` - power (float, optional): Power of the norm. (Default: `1.0`) - - Returns: - (Tensor, Tensor): The magnitude and phase of the complex tensor - """ - mag = complex_norm(complex_tensor, power) - phase = angle(complex_tensor) - return mag, phase - - def phase_vocoder( complex_specgrams: Tensor, rate: float,