Skip to content

Commit 1bc1479

Browse files
authored
LIBRISPEECH: fix .get_metadata type annotation (#3757)
1 parent 87aeb55 commit 1bc1479

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/torchaudio/datasets/librispeech.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __init__(
118118

119119
self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio))
120120

121-
def get_metadata(self, n: int) -> Tuple[Tensor, int, str, int, int, int]:
121+
def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]:
122122
"""Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform,
123123
but otherwise returns the same fields as :py:func:`__getitem__`.
124124

src/torchaudio/datasets/librispeech_biasing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def __init__(
129129
self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio))
130130
self.blist = blist
131131

132-
def get_metadata(self, n: int) -> Tuple[Tensor, int, str, int, int, int]:
132+
def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]:
133133
"""Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform,
134134
but otherwise returns the same fields as :py:func:`__getitem__`.
135135

0 commit comments

Comments
 (0)