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
OpenDAS
Torchaudio
Commits
33dc817c
Unverified
Commit
33dc817c
authored
Feb 24, 2021
by
Prabhat Roy
Committed by
GitHub
Feb 24, 2021
Browse files
Remove legacy backends (#1311)
parent
086467a1
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
torchaudio/datasets/tedlium.py
torchaudio/datasets/tedlium.py
+1
-5
torchaudio/extension/extension.py
torchaudio/extension/extension.py
+1
-0
No files found.
torchaudio/datasets/tedlium.py
View file @
33dc817c
...
...
@@ -153,11 +153,7 @@ class TEDLIUM(Dataset):
start_time
=
int
(
float
(
start_time
)
*
sample_rate
)
end_time
=
int
(
float
(
end_time
)
*
sample_rate
)
backend
=
torchaudio
.
get_audio_backend
()
if
backend
==
"sox"
or
(
backend
==
"soundfile"
and
torchaudio
.
USE_SOUNDFILE_LEGACY_INTERFACE
):
kwargs
=
{
"offset"
:
start_time
,
"num_frames"
:
end_time
-
start_time
}
else
:
kwargs
=
{
"frame_offset"
:
start_time
,
"num_frames"
:
end_time
-
start_time
}
kwargs
=
{
"frame_offset"
:
start_time
,
"num_frames"
:
end_time
-
start_time
}
return
torchaudio
.
load
(
path
,
**
kwargs
)
...
...
torchaudio/extension/extension.py
View file @
33dc817c
...
...
@@ -9,6 +9,7 @@ def _init_extension():
ext
=
'torchaudio._torchaudio'
if
_mod_utils
.
is_module_available
(
ext
):
_init_script_module
(
ext
)
import
torchaudio._torchaudio
# noqa
else
:
warnings
.
warn
(
'torchaudio C++ extension is not available.'
)
...
...
Prev
1
2
Next
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