# Voice Pipeline — Codex (per FVW v8 §22 + §41)

**Module ID:** `oscar.voice-pipeline`
**Status:** Constitutional (per §41 + latent doctrine, locally ratified).

## C1 — Behaviour Inventory
- `app/src/voice-pipeline/VoicePipeline.ts`
  - 5 stages (capture, transcribe, edit, save, confirm)
  - Web Speech API helper
  - Waveform estimator

## C2 — State Machine
forward: capture → transcribe → edit → save → confirm
backward: any → previous (modulo capture)

## C3 — Side Effect List
- IDB write on save (via voicesRepo)
- DOM updates in VoiceView

## C4 — Input Validation Contract
- Empty transcript prevented from save (operator confirms)

## C5 — Failure Modes
- SpeechRecognition unsupported → degraded mode (typed-only)

## C6 — User Simulation List
1. Capture → transcribe (real or simulated)
2. Edit text
3. Save
4. Confirm
5. Backward transitions work

## C7 — Reproducibility Test
Deterministic (waveform is deterministic per call).

## C8 — Shape Matrix
| Surface | Modes | Chips | States |
|---|---|---|---|
| Pipeline | forward, back, save, cancel | capture, edit, save | 5 states |

## C9 — State Shape Inventory
### C9.1 localStorage
None
### C9.2 In-memory
- VoicePipelineState: stage, transcript, duration_seconds, artefact_id
### C9.3 IDB
- voices store (from C2, used in save stage)

---

## END OF VOICE PIPELINE CODEX
