Skip to main content

Module lip

Module lip 

Source
Expand description

LIP binary lip-sync support. LIP binary reader and writer.

LIP files store lip-sync animation keyframes for voiced dialogue. Each keyframe maps a timestamp to a viseme (mouth shape) index.

§Shape of the container

A 16-byte header and a keyframe array directly after it. No offsets, because nothing here needs to point anywhere.

The five-byte keyframe stride is load-bearing rather than incidental: the engine animates straight off the raw file buffer instead of parsing the array, so the entries are packed with no alignment padding and adding any would be read as garbage rather than as a variant.

Byte-level field maps live in docs/src/formats/audio/lip.md, with the engine’s own load sequence.

Structs§

Lip
In-memory LIP container.
LipKeyframe
One LIP keyframe entry.
LipShapeCode
Lossless LIP shape code wrapper.

Enums§

LipBinaryError
Errors produced while parsing or serializing LIP binary data.
LipShape
Known LIP viseme (mouth shape) IDs.

Functions§

read_lip
Reads a LIP file from a reader.
read_lip_from_bytes
Reads a LIP file directly from bytes.
write_lip
Writes a LIP file to a writer.
write_lip_to_vec
Serializes a LIP file into bytes.