write_audio
- ketos.data_handling.database_interface.write_audio(table, data, attrs={}, id=None)[source]
Write an audio object, typically a waveform or spectrogram, to a HDF5 table.
- Args:
- table: tables.Table
Table in which the audio data will be stored. (described by table_description()).
- data: numpy.array or list(numpy.array)
Audio data array(s). The number of data arrays must match the number of data columns in the table.
- attrs: dict()
Instance attributes
- filename: str
Filename
- offset: float
Offset with respect to beginning of file in seconds.
- label: int
Integer valued label. Optional
- id: int
Unique identifier. Optional
- Returns:
- index: int
Index of row that the audio object was saved to.