Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ A typical Lhotse's dataset API usage might look like this:
from lhotse.dataset import K2SpeechRecognitionDataset, SimpleCutSampler

cuts = CutSet(...)
dset = K2SpeechRecognitionDataset(cuts)
dset = K2SpeechRecognitionDataset()
sampler = SimpleCutSampler(cuts, max_duration=500)
# Dataset performs batching by itself, so we have to indicate that
# to the DataLoader with batch_size=None
Expand Down
2 changes: 2 additions & 0 deletions lhotse/dataset/unsupervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def __init__(self, collate: bool = True) -> None:
self.collate = collate

def __getitem__(self, cuts: CutSet) -> Dict[str, Any]:
self._validate(cuts)

if self.collate:
audio, audio_lens = collate_audio(cuts)
return {
Expand Down