Skip to content

Commit 5418d93

Browse files
authored
Add deprecation warnings to load_wav functions (#905)
1 parent 92b027b commit 5418d93

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

torchaudio/backend/soundfile_backend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def load(filepath: str,
7373

7474

7575
@_mod_utils.requires_module('soundfile')
76+
@_mod_utils.deprecated('Please use "torchaudio.load".', '0.9.0')
7677
@common._impl_load_wav
7778
def load_wav(filepath, **kwargs):
7879
kwargs['normalization'] = 1 << 16

torchaudio/backend/sox_backend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def load(filepath: str,
6363

6464

6565
@_mod_utils.requires_module('torchaudio._torchaudio')
66+
@_mod_utils.deprecated('Please use "torchaudio.load".', '0.9.0')
6667
@common._impl_load_wav
6768
def load_wav(filepath, **kwargs):
6869
kwargs['normalization'] = 1 << 16

torchaudio/backend/sox_io_backend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def save(
175175

176176

177177
@_mod_utils.requires_module('torchaudio._torchaudio')
178+
@_mod_utils.deprecated('Please use "torchaudio.load".', '0.9.0')
178179
def load_wav(
179180
filepath: str,
180181
frame_offset: int = 0,

0 commit comments

Comments
 (0)