Skip to content

Commit

Permalink
LIBRISPEECH: fix .get_metadata type annotation (#3757)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuraga authored Mar 18, 2024
1 parent 87aeb55 commit 1bc1479
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/torchaudio/datasets/librispeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def __init__(

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

def get_metadata(self, n: int) -> Tuple[Tensor, int, str, int, int, int]:
def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]:
"""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__`.
Expand Down
2 changes: 1 addition & 1 deletion src/torchaudio/datasets/librispeech_biasing.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __init__(
self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio))
self.blist = blist

def get_metadata(self, n: int) -> Tuple[Tensor, int, str, int, int, int]:
def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]:
"""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__`.
Expand Down

0 comments on commit 1bc1479

Please sign in to comment.