"docs/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "6e265157466bbdae7625095516f8a5c9de706427"
Unverified Commit d35ea80e authored by S Harish's avatar S Harish Committed by GitHub
Browse files

Remove deprecated `F.magphase` (#1934)

parent cbf267c3
......@@ -86,10 +86,6 @@ complex_norm
.. autofunction:: complex_norm
magphase
--------
.. autofunction:: magphase
:hidden:`Filtering`
~~~~~~~~~~~~~~~~~~~
......
......@@ -12,7 +12,6 @@ from .functional import (
detect_pitch_frequency,
inverse_spectrogram,
griffinlim,
magphase,
mask_along_axis,
mask_along_axis_iid,
mu_law_encoding,
......@@ -65,7 +64,6 @@ __all__ = [
'DB_to_amplitude',
'detect_pitch_frequency',
'griffinlim',
'magphase',
'mask_along_axis',
'mask_along_axis_iid',
'mu_law_encoding',
......
......@@ -30,7 +30,6 @@ __all__ = [
"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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment