mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-09 17:14:20 +00:00
fixes to incorporate with the latest Lhotse release
This commit is contained in:
parent
3199058194
commit
b96fdebe8d
@ -26,7 +26,7 @@ from lhotse.dataset import (
|
|||||||
DynamicBucketingSampler,
|
DynamicBucketingSampler,
|
||||||
K2SpeechRecognitionDataset,
|
K2SpeechRecognitionDataset,
|
||||||
PrecomputedFeatures,
|
PrecomputedFeatures,
|
||||||
SingleCutSampler,
|
SimpleCutSampler,
|
||||||
)
|
)
|
||||||
from lhotse.dataset.input_strategies import OnTheFlyFeatures
|
from lhotse.dataset.input_strategies import OnTheFlyFeatures
|
||||||
from torch.utils.data import DataLoader
|
from torch.utils.data import DataLoader
|
||||||
@ -196,8 +196,8 @@ class YesNoAsrDataModule(DataModule):
|
|||||||
drop_last=True,
|
drop_last=True,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
logging.info("Using SingleCutSampler.")
|
logging.info("Using SimpleCutSampler.")
|
||||||
train_sampler = SingleCutSampler(
|
train_sampler = SimpleCutSampler(
|
||||||
cuts_train,
|
cuts_train,
|
||||||
max_duration=self.args.max_duration,
|
max_duration=self.args.max_duration,
|
||||||
shuffle=self.args.shuffle,
|
shuffle=self.args.shuffle,
|
||||||
|
@ -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 torch==1.13.1+cpu
|
||||||
-f https://download.pytorch.org/whl/cpu/torch_stable.html torchaudio==0.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
|
-f https://k2-fsa.org/nightly/ k2==1.23.4.dev20230319+cpu.torch1.13.1
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from lhotse import CutSet, load_manifest
|
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 lhotse.dataset.collation import collate_custom_field
|
||||||
from torch.utils.data import DataLoader
|
from torch.utils.data import DataLoader
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ def get_dataloader():
|
|||||||
cuts = load_manifest(cuts_json)
|
cuts = load_manifest(cuts_json)
|
||||||
print(cuts[0])
|
print(cuts[0])
|
||||||
cuts = cuts.with_features_path_prefix(egs_dir)
|
cuts = cuts.with_features_path_prefix(egs_dir)
|
||||||
sampler = SingleCutSampler(
|
sampler = SimpleCutSampler(
|
||||||
cuts,
|
cuts,
|
||||||
max_duration=10,
|
max_duration=10,
|
||||||
shuffle=False,
|
shuffle=False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user