espnet.utils.io_utils.SoundHDF5File
Less than 1 minute
espnet.utils.io_utils.SoundHDF5File
class espnet.utils.io_utils.SoundHDF5File(filepath, mode='r+', format=None, dtype='int16', **kwargs)
Bases: object
Collecting sound files to a HDF5 file.
>>> f = SoundHDF5File('a.flac.h5', mode='a')
>>> array = np.random.randint(0, 100, 100, dtype=np.int16)
>>> f['id'] = (array, 16000)
>>> array, rate = f['id']
- Param: str filepath:
- Param: str mode:
- Param: str format: The type used when saving wav. flac, nist, htk, etc.
- Param: str dtype:
Initialize Sound HDF5 File.
close()
Close file.
create_dataset(name, shape=None, data=None, **kwds)
Create Dataset.
items()
Return keys and values of file key.
keys()
Return keys of files.
values()
Return values of file key.