Skip to main content

Module render

Module render 

Source
Expand description

Rendering helpers for crate::voice::TranscriptEvent streams.

Two output formats are supported, both designed to stream — each event is flushed as soon as the backend emits it so a slow transcriber gives incremental feedback on stdout instead of buffering the full transcript.

  • Jsonl — one serde_json line per event. Stable, machine-readable.
  • Md — human-readable transcript. Consecutive Final events from the same speaker collapse into a single paragraph prefixed with [HH:MM:SS] **speaker**: (the **speaker**: prefix is omitted when no speaker is attached).

Lives under src/voice/ rather than src/cli/voice/ because the voice review command in #804 will reuse render_markdown.

Partial and Endpoint events are skipped in markdown mode: the batch backend in #801 emits no partials, and endpoint markers add no signal to a reader-oriented transcript.

Enums§

OutputFormat
Output format selector. The CLI maps --format md|jsonl directly onto this; the default value is chosen at runtime by detect_format.

Functions§

detect_format
Resolves the effective output format.
render_decisions_md
Renders the decisions.md body for a voice review pass.
render_jsonl
Streams events as JSON Lines to w, flushing after each event.
render_markdown
Streams events as Markdown to w.
render_todos_md
Renders the todos.md body for a voice review pass.