feat: support live transcription replay - #345
Open
jpr5 wants to merge 2 commits into
Open
Conversation
commit: |
jpr5
force-pushed
the
fix/live-transcribe-support-pr
branch
from
July 30, 2026 01:54
f2ffc7e to
23aca19
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns OpenAI transcription HTTP, Realtime, recorder, and replay behavior with the current nested GA wire contract.
intent=transcriptionsockets ignore regular realtime query models.audio.input.formatandaudio.input.transcription; Beta keeps its flat shim.transcript.text.donewithout a[DONE]sentinel.Baseline vs Candidate Local Proof
The exact probe ran against a clean detached
8d425a4worktree and the isolated candidate worktree. It used real local HTTP, WebSocket, recorder proxy, persisted fixture, and replay paths.Red: clean
8d425a4Green: candidate
6ae6ec4Validation
Fourth-Pass Red-Green
Red: terminal reported four stale GA expectations (legacy audio transcription field and missing ).
Green:
RUN v3.2.4 /private/tmp/aimock-live-transcribe-pr.0mGErr
✓ src/tests/ws-realtime.test.ts (83 tests) 7614ms
Test Files 1 passed (1)
Tests 83 passed (83)
Start at 14:39:20
Duration 8.13s (transform 235ms, setup 0ms, collect 300ms, tests 7.61s, environment 0ms, prepare 44ms) passed 83/83. Direct clean-baseline vs candidate VAD probe changed into nested , progressive live deltas, and journal interruption before completion. Full format, lint, typecheck, 145-file test suite, and build passed.
Fourth-pass proof: red terminal ws-realtime test had four stale GA audio expectation failures. Green exact file: 83 of 83 passed. Clean baseline VAD emitted an error; candidate returned nested audio.input.turn_detection server_vad, progressive deltas, and truncateAfterChunks journal interruption. Full format, lint, typecheck, 145-file tests, and build passed.
Fifth-pass red-green: baseline emitted GA session type conversation, top-level turn_detection, and accepted model mutation. Candidate emits realtime for normal GA sessions, keeps VAD under audio.input, rejects established model mutation, and preserves explicit transcription/translation session types. Red conformance test at ws-api-conformance line 618 is now green (66/66); full format, lint, tsc, tests, and build passed.
Sixth-Pass Red-Green
Red: clean baseline 2871866 accepted a real WebSocket mixed model/type update and persisted
gpt-4o-transcribe transcription must-not-mutate.Green: candidate returned
error invalid_session_config; its next valid update reportedgpt-realtime-mini realtime safe, proving rejection occurs before any session mutation. Live-transcription interruption now uses socket destruction and journals the interruption.Validation: focused ws-realtime suite 83/83 passed. Full format check, lint, typecheck, test suite, and build passed locally.
P2 Coverage Hardening
Commit f2ffc7e adds tests only; it does not change runtime behavior. The clean 71452a7 baseline already demonstrated the documented intent=transcription strict no-match and ErrorResponse paths, versioned model matching, abrupt interrupted socket termination with journal details, and scheduled inter-frame delivery.
The new direct tests cover those established paths, HTTP stream=true JSON errors, and JSON/SSE recorder-to-local-replay preservation of languages and usage. Applied as a test-only diff to detached 71452a7, the focused suite passed 132/132; the candidate focused suite also passed 132/132. Full format, lint, typecheck, test, and build passed on the candidate.