Skip to main content
Vane Data / Reference

audio_metadata

audio_metadata inspects bounded encoded AUDIOFILE metadata without decoding samples.

Signature

example.py
vane.audio_metadata(value, *, max_bytes=8388608) -> Expression

SQL: audio_metadata(file [, max_bytes]). Expression method: expr.audio_metadata(...).

Parameters

NameTypeDescriptionDefault
valueAUDIOFILE value or ExpressionEncoded audio object to inspectRequired
max_bytesInteger or ExpressionBounded metadata probe budget8 MiB (maximum 64 MiB)

Returns and errors

Returns a metadata STRUCT with format, subtype, sample rate, channels, frame count, and duration. NULL returns NULL; unreadable or unsupported audio raises.

Example

example.py
import vane


con = vane.connect()
con.sql("SELECT audio_metadata(audio_file('sample.wav'))").show()