The sigmf library makes it easy to interact with Signal Metadata Format
(SigMF) recordings. This library is compatible with Python 3.7-3.14 and is distributed
freely under the terms GNU Lesser GPL v3 License.
This module follows the SigMF specification html/pdf from the spec repository.
pip install sigmfimport sigmf
# read SigMF recording
meta = sigmf.fromfile("recording.sigmf-meta")
samples = meta[0:1024] # get first 1024 samples
sample_rate = meta.sample_rate # get sample rate
# read compressed SigMF archives
meta = sigmf.fromfile("recording.sigmf.gz") # gzip-compressed
meta = sigmf.fromfile("recording.sigmf.xz") # xz-compressed
meta = sigmf.fromfile("recording.sigmf.zip") # zip archive
# read other formats containing RF time series as SigMF
meta = sigmf.fromfile("recording.wav") # WAV
meta = sigmf.fromfile("recording.cdif") # BLUE / Platinum
meta = sigmf.fromfile("recording.xml") # Signal Hound Spikeimport numpy as np
import sigmf
data = np.array([0.1 + 0.2j, 0.3 + 0.4j], dtype=np.complex64)
meta = sigmf.fromarray(data, sample_rate=48000)
# creates recording.sigmf-data and recording.sigmf-meta
meta.tofile("recording")Please visit our documentation for full API reference and more info.
