@devries-cameron20 / t3code Mirror · read-only / commits / ddbc525f1c
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 22:15 UTC

fix(speech): removing filler words no longer joins paragraphs (#34101)

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>

Etan Heyman committed Nov 12, 2026 at 01:17 UTC ddbc525f1c8667ecb42500b3be2254df5b5bed4a
2 files changed +22 -1
apps/server/src/speech/SpeechService.test.ts
+18
@@ -533,6 +533,24 @@ it.effect("unloads after the chosen idle period and reloads on the next recordin
533 );
534
535 it.effect.each([
536 + {
537 + cue: undefined,
538 + remove: true,
539 + text: "First paragraph.\n\nSecond paragraph.",
540 + expected: "First paragraph.\n\nSecond paragraph.",
541 + },
542 + {
543 + cue: undefined,
544 + remove: true,
545 + text: "First um\n\nuh Second.",
546 + expected: "First\n\nSecond.",
547 + },
548 + {
549 + cue: undefined,
550 + remove: true,
551 + text: "First um\r\n\r\nuh Second.",
552 + expected: "First\r\n\r\nSecond.",
553 + },
554 { cue: "um", remove: true, text: "Make it red, um, blue.", expected: "Make it red, um, blue." },
555 {
556 cue: "uh no",
apps/server/src/speech/fillerWords.ts
+4 -1
@@ -38,5 +38,8 @@ export function removeSpeechFillerWords(
38 "giu",
39 );
40 const filtered = text.replace(pattern, (_match, cue: string | undefined) => cue ?? "");
41 - return filtered.replace(/\s{2,}/g, " ").trim();
41 + return filtered
42 + .replace(/[^\S\r\n]{2,}/g, " ")
43 + .replace(/[^\S\r\n]*([\r\n])[^\S\r\n]*/g, "$1")
44 + .trim();
45 }