Skip to content

Commit

Permalink
fix: librispeech waveform dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioschneider committed Sep 14, 2022
1 parent b2f3eaf commit 1147299
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion audio_data_pytorch/datasets/libri_speech_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __getitem__(
) -> Union[Tensor, Tuple[Tensor, Dict]]:
idx = idx.tolist() if torch.is_tensor(idx) else idx # type: ignore
data = self.dataset[idx]
waveform = torch.tensor(data["audio"]["array"]).view(1, -1)
waveform = torch.tensor(data["audio"]["array"]).view(1, -1).float()
info = dict(
sample_rate=data["audio"]["sampling_rate"],
text=data["text"],
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name="audio-data-pytorch",
packages=find_packages(exclude=[]),
version="0.0.11",
version="0.0.12",
license="MIT",
description="Audio Data - PyTorch",
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 1147299

Please sign in to comment.