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