# kcode-audio-ingress 0.7.2
Durable WAV ingress, Gemini transcription, recording-wide speaker feature normalization, classifier review packets, per-chunk human signoff, and signoff-gated final transcript reconciliation.
## Flow
`AudioIngress::submit` durably retains the original WAV before returning. The worker validates it and plans deterministic source intervals shorter than four minutes with five-second adjacent overlap. At most four Gemini audio requests run concurrently. Each uses `gemini-3.1-pro-preview`, returns free-form text, and is persisted immediately so retries do not repeat completed audio calls.
Gemini is asked for a complete transcript first, with stable `Speaker 1` labels in first-appearance order, complete English translations for non-English speech, faithful uncertainty and vulgarity, useful corrections and language/accent coaching for audibly non-native speech, and context annotations. After the transcript it supplies the frozen 24-feature profile for every speaker with enough usable speech.
After every raw result is durable, exactly one recording-wide `gpt-5.6-sol` call at `xhigh` reasoning normalizes all feature profiles. The library validates exact per-chunk coverage locally. It then scores complete profiles against `kcode-speaker-system`. Candidate scores are log-likelihood values relative to the library background fixed at zero; packets retain only the best candidate name, best score, and optional runner-up score.
The result is durable with `RecordingState::AwaitingReview` and no final transcript. No clean/unclean status is computed, displayed, or used for automatic training.
`AudioIngress::speaker_review_audio` seeks into the retained original and returns a browser-playable WAV containing only the exact reviewed interval, without reading or transcoding the complete recording. `AudioIngress::known_speakers` returns distinct stored names for review controls. `AudioIngress::confirm_speakers` signs off exactly one chunk using a `ChunkConfirmation`. Every observation must resolve to either `SpeakerResolution::Known { full_name }` or `SpeakerResolution::Unknown`. Compatible known feature rows are trained under deterministic keys; unknown or featureless resolutions are not trained. Signed chunks are immutable apart from exact idempotent retries.
Once every chunk is signed, the durable worker starts exactly one final GPT reconciliation pass. Its instructions precede chronological raw Gemini outputs and authoritative local-label mappings. It merges only duplicate overlap, uses approved names or `Unknown Speaker`, preserves translations, uncertainty, vulgarity, useful corrections/coaching/annotations, and filters feature analysis from the final Markdown. A retry resumes from the signed packet without repeating earlier model calls. Only the nonblank final transcript produces `RecordingState::Complete` and becomes eligible for downstream ingress.
`AudioIngress::resolve_legacy_review` resolves an obsolete unsigned packet only after its caller has determined whether downstream transcript ingress exists. `LegacyReviewDisposition::Reprocess` atomically archives the exact old transcript and packet, clears the active result, and queues the retained WAV through the current analysis pipeline. Revision-mismatched cached pieces are ignored by that pipeline. `LegacyReviewDisposition::Complete` retains both payloads, marks the accepted legacy recording complete, and suppresses its obsolete packet from `AudioIngress::status`. Exact retries are idempotent; other recording states are conflicts.
## Public surface
- `AudioIngress::{open, submit, status, retry, speaker_review_audio, known_speakers, confirm_speakers, resolve_legacy_review}`
- `AudioTranscriber::{new, transcribe}` for the non-durable analysis-only form
- `AudioInput`, `Submission`, `Status`, `RecordingStatus`, `RecordingState`, and `SpeakerReviewAudio`
- `CorrectionPacket`, `CorrectionChunk`, `CorrectionObservation`, `CandidateMapping`, `ParsedChunk`, and `ParsedSpeaker`
- `ChunkConfirmation`, `ObservationConfirmation`, `SpeakerResolution`, and `ConfirmationState`
- `LegacyReviewDisposition`
- typed intelligence callback requests, jobs, steps, statuses, and errors
The SQLite schema is version 11. `audio_legacy_review_archive` preserves the exact superseded transcript and packet before a legacy recording is reprocessed; it is retained for offline recovery and has no live loader. Existing `ready_for_ingress` rows with no final transcript represent review-ready recordings. Stored legacy packets are translated at the bounded persistence boundary; current packet serialization never restores legacy clean fields or background scores.