espnet2.train.dataset.ESPnetDataset
Less than 1 minute
espnet2.train.dataset.ESPnetDataset
class espnet2.train.dataset.ESPnetDataset(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', max_cache_size: float | int | str = 0.0, max_cache_fd: int = 0, allow_multi_rates: bool = False)
Bases: AbsDataset
Pytorch Dataset class for ESPNet.
Examples
>>> dataset = ESPnetDataset([('wav.scp', 'input', 'sound'),
... ('token_int', 'output', 'text_int')],
... )
... uttid, data = dataset['uttid']
{'input': per_utt_array, 'output': per_utt_array}
has_name(name) → bool
names() → Tuple[str, ...]