# models


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## AlignmentStepState

TypedDict for Phase 2 right column (VAD alignment) state.

------------------------------------------------------------------------

<a
href="https://github.com/cj-mills/cjm-transcript-vad-align/blob/main/cjm_transcript_vad_align/models.py#L16"
target="_blank" style="float:right; font-size:smaller">source</a>

### AlignmentStepState

``` python

def AlignmentStepState(
    args:VAR_POSITIONAL, kwargs:VAR_KEYWORD
):

```

*State for Phase 2 (right column): Temporal Alignment.*

## VADChunk

Represents a voice activity detection time range from the VAD plugin.

------------------------------------------------------------------------

<a
href="https://github.com/cj-mills/cjm-transcript-vad-align/blob/main/cjm_transcript_vad_align/models.py#L37"
target="_blank" style="float:right; font-size:smaller">source</a>

### VADChunk

``` python

def VADChunk(
    index:int, start_time:float, end_time:float, audio_file_index:int=0
)->None:

```

*A voice activity detection time range.*

## AlignmentUrls

URL bundle for Phase 2 alignment route handlers and renderers.

------------------------------------------------------------------------

<a
href="https://github.com/cj-mills/cjm-transcript-vad-align/blob/main/cjm_transcript_vad_align/models.py#L70"
target="_blank" style="float:right; font-size:smaller">source</a>

### AlignmentUrls

``` python

def AlignmentUrls(
    card_stack:CardStackUrls=<factory>, init:str='', audio_src:str='', toggle_auto_nav:str=''
)->None:

```

*URL bundle for Phase 2 alignment route handlers and renderers.*

## Tests

``` python
# VADChunk with audio_file_index
chunk = VADChunk(index=0, start_time=1.0, end_time=3.5, audio_file_index=2)
assert chunk.audio_file_index == 2
assert chunk.duration == 2.5
d = chunk.to_dict()
assert d["audio_file_index"] == 2
assert VADChunk.from_dict(d).audio_file_index == 2

# Backward compat: missing audio_file_index defaults to 0
legacy = {"index": 5, "start_time": 0.0, "end_time": 1.0}
assert VADChunk.from_dict(legacy).audio_file_index == 0

# Legacy field removal still works
legacy_with_assigned = {"index": 0, "start_time": 0.0, "end_time": 1.0, "assigned_segment": None}
assert VADChunk.from_dict(legacy_with_assigned).audio_file_index == 0
print("VADChunk model tests passed")
```
