espnet2.fileio.rand_gen_dataset.IntRandomGenerateDataset
Less than 1 minute
espnet2.fileio.rand_gen_dataset.IntRandomGenerateDataset
class espnet2.fileio.rand_gen_dataset.IntRandomGenerateDataset(shape_file: Path | str, low: int, high: int | None = None, dtype: str | dtype = 'int64', loader_type: str = 'csv_int')
Bases: Mapping
Generate float array from shape.txt
Examples
shape.txt uttA 123,83 uttB 34,83
dataset = IntRandomGenerateDataset(“shape.txt”, low=0, high=10) array = dataset[“uttA”] assert array.shape == (123, 83) array = dataset[“uttB”] assert array.shape == (34, 83)