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
1bc1479c
Unverified
Commit
1bc1479c
authored
Mar 18, 2024
by
Alexander Kurakin
Committed by
GitHub
Mar 18, 2024
Browse files
LIBRISPEECH: fix `.get_metadata` type annotation (#3757)
parent
87aeb554
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/torchaudio/datasets/librispeech.py
src/torchaudio/datasets/librispeech.py
+1
-1
src/torchaudio/datasets/librispeech_biasing.py
src/torchaudio/datasets/librispeech_biasing.py
+1
-1
No files found.
src/torchaudio/datasets/librispeech.py
View file @
1bc1479c
...
@@ -118,7 +118,7 @@ class LIBRISPEECH(Dataset):
...
@@ -118,7 +118,7 @@ class LIBRISPEECH(Dataset):
self
.
_walker
=
sorted
(
str
(
p
.
stem
)
for
p
in
Path
(
self
.
_path
).
glob
(
"*/*/*"
+
self
.
_ext_audio
))
self
.
_walker
=
sorted
(
str
(
p
.
stem
)
for
p
in
Path
(
self
.
_path
).
glob
(
"*/*/*"
+
self
.
_ext_audio
))
def
get_metadata
(
self
,
n
:
int
)
->
Tuple
[
Tenso
r
,
int
,
str
,
int
,
int
,
int
]:
def
get_metadata
(
self
,
n
:
int
)
->
Tuple
[
st
r
,
int
,
str
,
int
,
int
,
int
]:
"""Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform,
"""Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform,
but otherwise returns the same fields as :py:func:`__getitem__`.
but otherwise returns the same fields as :py:func:`__getitem__`.
...
...
src/torchaudio/datasets/librispeech_biasing.py
View file @
1bc1479c
...
@@ -129,7 +129,7 @@ class LibriSpeechBiasing(Dataset):
...
@@ -129,7 +129,7 @@ class LibriSpeechBiasing(Dataset):
self
.
_walker
=
sorted
(
str
(
p
.
stem
)
for
p
in
Path
(
self
.
_path
).
glob
(
"*/*/*"
+
self
.
_ext_audio
))
self
.
_walker
=
sorted
(
str
(
p
.
stem
)
for
p
in
Path
(
self
.
_path
).
glob
(
"*/*/*"
+
self
.
_ext_audio
))
self
.
blist
=
blist
self
.
blist
=
blist
def
get_metadata
(
self
,
n
:
int
)
->
Tuple
[
Tenso
r
,
int
,
str
,
int
,
int
,
int
]:
def
get_metadata
(
self
,
n
:
int
)
->
Tuple
[
st
r
,
int
,
str
,
int
,
int
,
int
]:
"""Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform,
"""Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform,
but otherwise returns the same fields as :py:func:`__getitem__`.
but otherwise returns the same fields as :py:func:`__getitem__`.
...
...
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