Export Transform

Export Transform#

Module that provides scripts for running public API transforms.

osekit.public.export_transform.create_parser() ArgumentParser#

Create the argument parser.

osekit.public.export_transform.main() None#

Export a transform.

osekit.public.export_transform.write_transform_output(output_type: OutputType, ads: AudioDataset | None, sds: SpectroDataset | None, subtype: str | None = None, spectrum_folder_path: Path | None = None, spectrogram_folder_path: Path | None = None, welch_folder_path: Path | None = None, first: int = 0, last: int | None = None, logger: logging.Logger | None = None, *, link: bool = True) None#

Write SpectroDataset output files to disk.

Parameters#

output_type: OutputType

Flags that should be used to specify the type of transform to run. See Transform.OutputType docstring for more info.

subtype: str | None

Subtype of the written audio files as provided by the soundfile module. Defaulted as the default 16-bit PCM for wav audio files. This parameter has no effect if Transform.AUDIO is not in transform.

ads: AudioDataset

The AudioDataset of which the data should be written.

sds: SpectroDataset

The SpectroDataset of which the data should be written.

spectrum_folder_path: Path

The folder in which the npz spectrum files should be written.

spectrogram_folder_path: Path

The folder in which the spectrogram png files should be written.

welch_folder_path: Path

The folder in which the welch npz files should be written.

link: bool

If True, the ads data will be linked to the exported files.

first: int

Index of the first data object to write.

last: int|None

Index after the last data object to write.

logger: logging.Logger | None

Logger to use to log the transform steps.