Skip to content
Konjure / spatial intelligence

AudioBlock

← Builtin reference

Decoded audio samples with a checked sample rate.

Signature

type AudioBlock { samples: Tensor[f32]; sample_rate: u32; }

Samples have shape [sample_frames, channels] and finite f32 values. The SDK validates channel count and sample rate. This is a decoded block; playback, capture and scheduling belong to the host.

Fields

samples: Tensor[f32]
Sample-major f32 data with channels on the trailing axis.
sample_rate: u32
Samples per second, from 1 through 384000.

Examples

Construct AudioBlock

Inspect the typed payload and metadata.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
[4, 1]
48000

Rust definition

A checked language record delegating decoded media validation to konjure_sdk::data.

See also