"...text-generation-inference.git" did not exist on "343437c7b5987c64cd3353b0913ffad5fd3df4b5"
Unverified Commit 0f80bcf9 authored by moto's avatar moto Committed by GitHub
Browse files

Add deprecation warnings to libsox internal functions (#975)

parent fd6e0441
...@@ -92,6 +92,9 @@ def info(filepath: str) -> Tuple[SignalInfo, EncodingInfo]: ...@@ -92,6 +92,9 @@ def info(filepath: str) -> Tuple[SignalInfo, EncodingInfo]:
@_mod_utils.requires_module('torchaudio._torchaudio') @_mod_utils.requires_module('torchaudio._torchaudio')
@_mod_utils.deprecated(
'Please migrate to "sox_io" backend. See https://github.com/pytorch/audio/issues/903 for the detail',
'0.9.0')
def save_encinfo(filepath: str, def save_encinfo(filepath: str,
src: Tensor, src: Tensor,
channels_first: bool = True, channels_first: bool = True,
...@@ -163,6 +166,9 @@ def save_encinfo(filepath: str, ...@@ -163,6 +166,9 @@ def save_encinfo(filepath: str,
@_mod_utils.requires_module('torchaudio._torchaudio') @_mod_utils.requires_module('torchaudio._torchaudio')
@_mod_utils.deprecated(
'Please migrate to "sox_io" backend. See https://github.com/pytorch/audio/issues/903 for the detail',
'0.9.0')
def sox_signalinfo_t() -> SignalInfo: def sox_signalinfo_t() -> SignalInfo:
r"""Create a sox_signalinfo_t object. This object can be used to set the sample r"""Create a sox_signalinfo_t object. This object can be used to set the sample
rate, number of channels, length, bit precision and headroom multiplier rate, number of channels, length, bit precision and headroom multiplier
...@@ -186,6 +192,9 @@ def sox_signalinfo_t() -> SignalInfo: ...@@ -186,6 +192,9 @@ def sox_signalinfo_t() -> SignalInfo:
@_mod_utils.requires_module('torchaudio._torchaudio') @_mod_utils.requires_module('torchaudio._torchaudio')
@_mod_utils.deprecated(
'Please migrate to "sox_io" backend. See https://github.com/pytorch/audio/issues/903 for the detail',
'0.9.0')
def sox_encodinginfo_t() -> EncodingInfo: def sox_encodinginfo_t() -> EncodingInfo:
r"""Create a sox_encodinginfo_t object. This object can be used to set the encoding r"""Create a sox_encodinginfo_t object. This object can be used to set the encoding
type, bit precision, compression factor, reverse bytes, reverse nibbles, type, bit precision, compression factor, reverse bytes, reverse nibbles,
...@@ -224,6 +233,9 @@ def sox_encodinginfo_t() -> EncodingInfo: ...@@ -224,6 +233,9 @@ def sox_encodinginfo_t() -> EncodingInfo:
@_mod_utils.requires_module('torchaudio._torchaudio') @_mod_utils.requires_module('torchaudio._torchaudio')
@_mod_utils.deprecated(
'Please migrate to "sox_io" backend. See https://github.com/pytorch/audio/issues/903 for the detail',
'0.9.0')
def get_sox_encoding_t(i: int = None) -> EncodingInfo: def get_sox_encoding_t(i: int = None) -> EncodingInfo:
r"""Get enum of sox_encoding_t for sox encodings. r"""Get enum of sox_encoding_t for sox encodings.
...@@ -242,6 +254,9 @@ def get_sox_encoding_t(i: int = None) -> EncodingInfo: ...@@ -242,6 +254,9 @@ def get_sox_encoding_t(i: int = None) -> EncodingInfo:
@_mod_utils.requires_module('torchaudio._torchaudio') @_mod_utils.requires_module('torchaudio._torchaudio')
@_mod_utils.deprecated(
'Please migrate to "sox_io" backend. See https://github.com/pytorch/audio/issues/903 for the detail',
'0.9.0')
def get_sox_option_t(i: int = 2) -> Any: def get_sox_option_t(i: int = 2) -> Any:
r"""Get enum of sox_option_t for sox encodinginfo options. r"""Get enum of sox_option_t for sox encodinginfo options.
...@@ -259,6 +274,9 @@ def get_sox_option_t(i: int = 2) -> Any: ...@@ -259,6 +274,9 @@ def get_sox_option_t(i: int = 2) -> Any:
@_mod_utils.requires_module('torchaudio._torchaudio') @_mod_utils.requires_module('torchaudio._torchaudio')
@_mod_utils.deprecated(
'Please migrate to "sox_io" backend. See https://github.com/pytorch/audio/issues/903 for the detail',
'0.9.0')
def get_sox_bool(i: int = 0) -> Any: def get_sox_bool(i: int = 0) -> Any:
r"""Get enum of sox_bool for sox encodinginfo options. r"""Get enum of sox_bool for sox encodinginfo options.
......
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