Skip to content

Commit

Permalink
fixes to incorporate with the latest Lhotse release
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr committed Sep 13, 2023
1 parent 3199058 commit b96fdeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions egs/yesno/ASR/tdnn/asr_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
DynamicBucketingSampler,
K2SpeechRecognitionDataset,
PrecomputedFeatures,
SingleCutSampler,
SimpleCutSampler,
)
from lhotse.dataset.input_strategies import OnTheFlyFeatures
from torch.utils.data import DataLoader
Expand Down Expand Up @@ -196,8 +196,8 @@ def train_dataloaders(self) -> DataLoader:
drop_last=True,
)
else:
logging.info("Using SingleCutSampler.")
train_sampler = SingleCutSampler(
logging.info("Using SimpleCutSampler.")
train_sampler = SimpleCutSampler(
cuts_train,
max_duration=self.args.max_duration,
shuffle=self.args.shuffle,
Expand Down
1 change: 1 addition & 0 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ graphviz==0.19.1

-f https://download.pytorch.org/whl/cpu/torch_stable.html torch==1.13.1+cpu
-f https://download.pytorch.org/whl/cpu/torch_stable.html torchaudio==0.13.1+cpu
six

-f https://k2-fsa.org/nightly/ k2==1.23.4.dev20230319+cpu.torch1.13.1

Expand Down
4 changes: 2 additions & 2 deletions test/test_ali.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from pathlib import Path

from lhotse import CutSet, load_manifest
from lhotse.dataset import K2SpeechRecognitionDataset, SingleCutSampler
from lhotse.dataset import K2SpeechRecognitionDataset, SimpleCutSampler
from lhotse.dataset.collation import collate_custom_field
from torch.utils.data import DataLoader

Expand All @@ -44,7 +44,7 @@ def get_dataloader():
cuts = load_manifest(cuts_json)
print(cuts[0])
cuts = cuts.with_features_path_prefix(egs_dir)
sampler = SingleCutSampler(
sampler = SimpleCutSampler(
cuts,
max_duration=10,
shuffle=False,
Expand Down

0 comments on commit b96fdeb

Please sign in to comment.