Skip to main content

Module contract

Module contract 

Source
Expand description

rightkit.transcript.v1: word-timed speech for one source.

Times are integer milliseconds on the SOURCE timeline (0 = first audio sample). Words must be sorted by start_ms, start_ms < end_ms, with no overlaps; Transcript::validate enforces that so cut planning and caption building can rely on it.

§Schema ids

IdConstantReadWritten
rightkit.transcript.v1SCHEMAyesby default (from_words)
cutright.transcript.v1LEGACY_SCHEMAyesonly via Transcript::to_json_with_schema_id

ACCEPTED_SCHEMAS lists exactly these ids; any other id is rejected on read. A parsed transcript keeps the id it was read with. Transcript::validate accepts both ids on purpose, so CutRight files stay readable.

Transcript::from_json is lenient: unknown fields are ignored and absent source_blake3, language, vad or model fields take their defaults. Transcript::from_json_strict matches CutRight: it rejects unknown fields and requires those fields (with a non-empty source_blake3), reporting TranscriptError::MissingField by name.

Structs§

ModelRef
Span
Transcript
Word

Enums§

EndSource
How a word’s timing was derived.
TranscriptError

Constants§

ACCEPTED_SCHEMAS
Schema ids this crate accepts on read. Also the only ids Transcript::to_json_with_schema_id will write, so its output always reads back. Keep in step with the table in the module docs.
LEGACY_SCHEMA
SCHEMA