Repository navigation
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Speech filler cleanup now preserves paragraph breaks instead of joining paragraphs. The change is confined to transcript whitespace formatting, with no settings-default or external-system changes. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentpartial verification at
Not verifiedprovider-returned paragraph breaks through the real client and speech provider. all three cloud speech keys were unconfigured. local parakeet transcribed the spoken words "new paragraph" literally, so neither main nor the pr received a multiline transcript. direct calls reproduced main collapsing LF paragraphs and the pr preserving LF/CRLF, but those calls and the passing tests do not establish the requested end-to-end proof. native desktop, ios and android clients, other speech models, and real cloud speech services were not exercised. no code was changed or pushed. completing paragraph verification needs a real cloud speech credential and audio that returns multiline transcription. |
Verified: provider-returned paragraph breaksran an authenticated HTTP A/B on macOS with a real local OpenAI-compatible transcription server and #32530's custom speech path. the server transcribed an archived clip; no responses were mocked. no audio was played or recorded. A was
B matched the provider text exactly after trimming leading/trailing whitespace. A differed only by replacing the blank line with one space. hashes are of trimmed UTF-8 text. all test processes were stopped. Not verifiedrendered web/composer behavior, native desktop, ios or android clients, and cloud vendors were not exercised. this verifies the real authenticated server/provider path, not the remaining rendered-client paragraph check. no code was pushed and no installed app was changed. |
binjamshid
left a comment
There was a problem hiding this comment.
The old \s{2,} → " " collapse was what joined paragraphs. Collapsing only horizontal whitespace ([^\S\r\n]{2,}) and then trimming horizontal whitespace around each CR/LF fixes it while keeping single-line output the same. The new table rows run through both batch and stream finalization and cover LF, CRLF, and fillers at line edges. The external A/B in the comments also confirms the provider text now survives intact.
No defects found. Two small behaviour notes, neither needs a change:
- (low)
apps/server/src/speech/fillerWords.ts:42-43— runs of blank lines are no longer collapsed (before,\n\n\nbecame one space; now it stays three newlines), and leading indentation on each line is stripped. Both look fine for dictation output; mentioning them only because this function is shared byCloudSpeech.tsandSpeechService.ts. - (low) Unicode line/paragraph separators (U+2028/U+2029) still count as horizontal whitespace under
[^\S\r\n], so they are still folded to a space. Unlikely from current providers; adding\u2028\u2029to both character classes would make the rule "preserve any line break" exact.
Agree with the note about #32406 that the two changes compose; a rebase there should be textual only.


Problem
With Remove filler words enabled,
First paragraph.\n\nSecond paragraph.becomesFirst paragraph. Second paragraph.even though it contains no filler words. The shared whitespace cleanup joins paragraph breaks in cloud transcription, or any transcript that contains line breaks.Change
Collapse repeated whitespace excluding CR and LF, remove whitespace around those line breaks, and retain the existing outer trim. Single-line cleanup remains unchanged. Extend the existing batch/stream test table with paragraph preservation and fillers at LF/CRLF line edges.
Scope and approval
No issue: small fix for an obvious bug, because the setting is about filler words and the paragraph loss happens even when there are none.
Verification
17a6a01d84e3adf9f29df2639d6b6079a434e1b2, with regression rows added before the source fix.vp test run apps/server/src/speech/SpeechService.test.ts: before fix, 3 failed / 37 passed (40). ExpectedFirst paragraph.\n\nSecond paragraph., receivedFirst paragraph. Second paragraph.; the filler and LF/CRLF edge cases likewise lost breaks.vp run check:changed: passed format, lint, GraphQL, typecheck (3 packages), knip, and tests (42 passed across 2 files). Full CI suites and build were not run.CloudSpeech.ts,SpeechService.ts) return strings with only outer trim after filler cleanup; no single-line dependency there.Prior PRs
#32406 changes optional punctuation matching after a filler to consume ellipses. This fix leaves that pattern untouched and changes only subsequent whitespace cleanup. They compose semantically: an in-memory combination of the two changes produced
First paragraph.\n\nSecond.fromUm... First paragraph.\n\nUh… Second.. Nearby edits in the same function/test table may need a trivial textual rebase; neither change supersedes the other.Review: one other-vendor round (Claude Opus 5.5): code approved; two redundant test rows removed and wording narrowed to transcripts that contain line breaks.
🤖 Implemented by GPT-6.1 Sol (Codex) in T3 Code; reviewed by Claude Opus 5.5 (Claude Code).