Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hehl2
Torchaudio
Commits
8181a83b
"...deeplabv3_migraphx.git" did not exist on "b5cd7a1c2e992e55b62eb473883889a84ee98b77"
Unverified
Commit
8181a83b
authored
Jul 16, 2020
by
moto
Committed by
GitHub
Jul 16, 2020
Browse files
Add deprication warnings to SoxEffect and SoxEffectsChain (#787)
parent
60a8e23d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
torchaudio/_internal/module_utils.py
torchaudio/_internal/module_utils.py
+1
-1
torchaudio/sox_effects/sox_effects.py
torchaudio/sox_effects/sox_effects.py
+10
-0
No files found.
torchaudio/_internal/module_utils.py
View file @
8181a83b
...
...
@@ -48,7 +48,7 @@ def deprecated(direction: str, version: Optional[str] = None):
def
wrapped
(
*
args
,
**
kwargs
):
message
=
(
f
'
{
func
.
__module__
}
.
{
func
.
__name__
}
has been deprecated '
f
'and will be removed from
{
"future"
if
version
is
None
else
version
}
release.'
f
'and will be removed from
{
"future"
if
version
is
None
else
version
}
release.
'
f
'
{
direction
}
'
)
warnings
.
warn
(
message
,
stacklevel
=
2
)
return
func
(
*
args
,
**
kwargs
)
...
...
torchaudio/sox_effects/sox_effects.py
View file @
8181a83b
...
...
@@ -179,9 +179,14 @@ def apply_effects_file(
@
_mod_utils
.
requires_module
(
'torchaudio._torchaudio'
)
@
_mod_utils
.
deprecated
(
'Please migrate to `apply_effects_file` or `apply_effects_tensor`.'
)
def
SoxEffect
():
r
"""Create an object for passing sox effect information between python and c++
Note:
This function is deprecated.
Please migrate to :func:`apply_effects_file` or :func:`apply_effects_tensor`.
Returns:
SoxEffect: An object with the following attributes: ename (str) which is the
name of effect, and eopts (List[str]) which is a list of effect options.
...
...
@@ -189,9 +194,14 @@ def SoxEffect():
return
_torchaudio
.
SoxEffect
()
@
_mod_utils
.
deprecated
(
'Please migrate to `apply_effects_file` or `apply_effects_tensor`.'
)
class
SoxEffectsChain
(
object
):
r
"""SoX effects chain class.
Note:
This class is deprecated.
Please migrate to :func:`apply_effects_file` or :func:`apply_effects_tensor`.
Args:
normalization (bool, number, or callable, optional): If boolean `True`, then output is divided by `1 << 31`
(assumes signed 32-bit audio), and normalizes to `[-1, 1]`. If `number`, then output is divided by that
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment