vad_card

VAD chunk card renderer for the alignment card stack

Card Renderer

Each VAD chunk card is a compact row showing time range and duration. Much simpler than segment cards — no split mode, no token selector.


source

render_vad_card


def render_vad_card(
    chunk:VADChunk, # VAD chunk to render
    card_role:Literal, # Role of this card in viewport ("focused" or "context")
    has_boundary_above:bool=False, # Audio file boundary exists above this card
    has_boundary_below:bool=False, # Audio file boundary exists below this card
)->Any: # VAD chunk card component

Render a single VAD chunk card with time range, duration, playing indicator, and play button.

Card Renderer Factory

Creates a callback compatible with the card stack library’s render_card parameter.


source

create_vad_card_renderer


def create_vad_card_renderer(
    audio_file_boundaries:Set=None, # Indices where audio_file_index changes
)->Callable: # Card renderer callback: (item, CardRenderContext) -> FT

Create a card renderer callback for VAD chunk cards.