Skip to main content

Module multimodal

Module multimodal 

Source
Expand description

Multi-Modal Memory for Microscope Memory.

Extends beyond text to store and recall images (perceptual hashes), audio (spectral fingerprints), and structured data (typed key-value pairs) within the same spatial coordinate framework.

Binary format: modalities.bin (MOD1)

Modalities are stored as a sidecar index — the core BlockHeader (32B mmap’d) is unchanged. Each entry maps a block_idx to its modality metadata.

Structs§

AudioMeta
ImageMeta
ModalityIndex
Sidecar index mapping block indices to modality metadata.
ModalityStats
StructuredMeta

Enums§

FieldValue
Modality

Functions§

compute_phash
Compute perceptual hash (dHash-like) from grayscale pixel data. Expects row-major grayscale pixels.
compute_spectral_fingerprint
Simple spectral fingerprint from audio samples. Divides into 16 frequency bands and computes energy per band.
hamming_distance
Hamming distance between two byte arrays.