sigmf.convert.wav.wav_to_sigmf

sigmf.convert.wav.wav_to_sigmf(wav_path: str, out_path: str | None = None, create_archive: bool = False, create_ncd: bool = False, overwrite: bool = False) SigMFFile

Read a wav, optionally write sigmf, return associated SigMF object.

Parameters:
  • wav_path (str) – Path to the WAV file.

  • out_path (str, optional) – Path to the output SigMF metadata file.

  • create_archive (bool, optional) – When True, package output as a .sigmf archive.

  • create_ncd (bool, optional) – When True, create Non-Conforming Dataset with header_bytes and trailing_bytes.

  • overwrite (bool, optional) – If False, raise exception if output files already exist.

Returns:

SigMF object, potentially as Non-Conforming Dataset.

Return type:

SigMFFile

Raises:

wave.Error – If the wav file cannot be read.