Repository navigation
Pack short meeting speech segments into one speech-to-text pass - #1862
Merged
Merged
Conversation
Parakeet runs every call on a fixed 15 s window, so a 4 s segment costs as much encoder work as 15 s of audio, and a meeting made one call per segment. Short segments from the call audio and the default mic path now go end to end with 0.5 s of silence between them into one call, and the text is split back per segment by token start times. A packed call that fails falls back to one call per segment. TRANSCRIPTED_MEETING_STT_PACKING=0 turns packing off. Also keeps the Mac from napping or idle-sleeping while a transcription job runs, and gives the CLI meeting import the same packing plus a timing line so a before/after run can prove the speedup. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcH2PBaqN6yYkxeoaYrj45
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcH2PBaqN6yYkxeoaYrj45
Picks up the VM test socket-path fix (#1883) and everything merged today. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
r3dbars
marked this pull request as ready for review
September 28, 2026 02:53
This was referenced Sep 28, 2026
This was referenced Sep 29, 2026
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.
Why
Before: after Stop, a meeting made one Parakeet call per speech segment. Parakeet pads every call to a fixed 15 s window, so a typical 4 s segment cost the same work as 15 s of audio. Nothing kept the Mac awake while the job ran, so App Nap or idle sleep could stretch long jobs.
After: short segments are laid end to end (0.5 s silence between them) into one 15 s pass, and the text is split back per segment by token start times. A meeting needs roughly a third of the calls. The Mac stays awake (no App Nap, no idle sleep) while a transcription job runs.
Product Impact
meetingsmeeting reliabilityWhat changed
SpeechSegmentPacking(TranscriptedCore): layout of packed audio, word-level split by first-token start against mid-gap boundaries, and an in-order batcher. Segments longer than the window still go alone.SpeechToTextEnginegains optionalpackedSegmentWindowSamples/transcribePackedSegments(default nil, so other engines are unchanged).TranscriptionPipeline: system-audio loop and default mic loop go through the batcher. A packed call that fails or returns the wrong count falls back to one call per segment; cancellation still rethrows.ParakeetEngine.transcribePackedSamplesWithTokenTimes+STTRouterwiring: Parakeet TDT v2/v3 only, auto language only. Whisper and explicit-language paths are untouched.MeetingSTTAdapter: packing path, custom dictionary per segment, timings still recorded.TRANSCRIPTED_MEETING_STT_PACKING=0turns it off.TranscriptionJobActivity.keepingMacAwakewraps live, import and retry pipeline runs in a.userInitiatedactivity.import-audio: same packing switch plus a timing line ("N speech-to-text calls taking Y s (packing on/off)") for the before/after run.SpeechSegmentPackingTests(layout, split, batcher, zero window, fallback).How I checked it
scripts/dev/agent-preflight.shbash scripts/dev/linux-checks.sh(runs without Swift) — 48 passed.agents/test-matrix.ymlfor the files changed (CI)bash build.sh --no-open(CI)bash run-tests.sh(CI)bash run-integration-smoke.sh(CI)swift test(CI)swift test --package-path Tools/TranscriptedCLI(CI)Checks I could not run, and why:
Mac or hardware test still needed? Yes:
TRANSCRIPTED_MEETING_STT_PACKING=0 transcripted import-audio <30-60 min recording> --output-dir <tmp>then the same without the variable. The timing line should show about a third of the calls and a shorter speech-to-text time with packing on. Onmainthere is no packing, so the call count matches the "off" run.Risk Review
meeting_packed_segments_transcribed)check-source-pins.py --changed-onlyPASS).agent-review/visuals/evidence (no UI)Notes
Follows #1861 (stage timings on
meeting_transcript_saved), which will show the effect in real meetings viastt_calls,stt_msandsleep_ms. Main risk: a word near a segment edge landing in the neighbouring segment.Agent handoff
COORD_DONE: BRIEF | this PR | packing + keep-awake + CLI timing | none | decisions: Mac before/after run needs Justin's OK | linux-checks, source pins | CI green + deep review🤖 Generated with Claude Code
https://claude.ai/code/session_01LcH2PBaqN6yYkxeoaYrj45
Generated by Claude Code
Mac results (2026-09-28, Apple M5 Max): passed
Built with this branch combined with main plus #1791 and #1788. Checks passed:
build-deps --force,build.sh,run-tests.sh,swift test(incl.SpeechSegmentPackingTests),run-integration-smoke.sh,swift test --package-path Tools/TranscriptedCLI, and the CLI manifest and packaging tests.transcripted-cli import-audio(--no-speaker-identification), packing off vs on:Accuracy:
Packing is faster and no less accurate here.