Skip to content

Commit

Permalink
[docs] minor fix (#1439)
Browse files Browse the repository at this point in the history
* [docs] minor fix

* validate cuts of UnsupervisedWaveformDataset
  • Loading branch information
pengzhendong authored Dec 19, 2024
1 parent 9bd2071 commit 509f4a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 509f4a9

Please sign in to comment.