espnet2.train.iterable_dataset.IterableESPnetDataset
Less than 1 minute
espnet2.train.iterable_dataset.IterableESPnetDataset
class espnet2.train.iterable_dataset.IterableESPnetDataset(path_name_type_list: Collection[Tuple[str, str, str]], preprocess: Callable[[str, Dict[str, ndarray]], Dict[str, ndarray]] | None = None, float_dtype: str = 'float32', int_dtype: str = 'long', key_file: str | List | None = None, preprocess_prefix: str | None = None)
Bases: IterableDataset
Pytorch Dataset class for ESPNet.
Examples
>>> dataset = IterableESPnetDataset([('wav.scp', 'input', 'sound'),
... ('token_int', 'output', 'text_int')],
... )
>>> for uid, data in dataset:
... data
{'input': per_utt_array, 'output': per_utt_array}
has_name(name) → bool
names() → Tuple[str, ...]