espnet2.fileio.npy_scp.NpyScpWriter
Less than 1 minute
espnet2.fileio.npy_scp.NpyScpWriter
class espnet2.fileio.npy_scp.NpyScpWriter(outdir: Path | str, scpfile: Path | str)
Bases: object
Writer class for a scp file of numpy file.
Examples
key1 /some/path/a.npy key2 /some/path/b.npy key3 /some/path/c.npy key4 /some/path/d.npy …
>>> writer = NpyScpWriter('./data/', './data/feat.scp')
>>> writer['aa'] = numpy_array
>>> writer['bb'] = numpy_array
close()
get_path(key)