Repository navigation
feat: dictation built into the composer, with local Parakeet - #2
Merged
Merged
Conversation
The server turns streamed microphone audio into text with Parakeet through transcribe.cpp, on its own machine. The model (found in the Scrawl or Hex model folders, or T3CODE_DICTATION_MODEL) loads on the first chunk while the user already speaks and is let go after 15 minutes unused. One model serves every client. - dictation.append/finish/cancel: a recording session with a live preview of the last 20 seconds. - Filler sounds are removed; a closing "Reinschrift" asks for a structured rewrite. - dictation.structure: rewrites a rambling transcript into a structured prompt with Claude Haiku (claude --print). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mic button next to "Attach files" and F9 record the microphone and insert the transcript at the caret; F8 (or shift-click, or ending with "Reinschrift") has it rewritten into a structured prompt first. Esc cancels a recording, or skips the rewrite and inserts the plain text. A small panel above the button shows the live transcript and status. Audio is captured in an AudioWorklet (served from public/, the desktop CSP blocks blob: worklets), resampled to 16 kHz and streamed to the server every half second. The microphone needs a secure context, so a plain http:// LAN address cannot dictate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package stays external like node-pty, so its platform package (@transcribe-cpp/<os>-<arch>, picked by os/cpu) lands in server.asar. Its DLLs are unpacked beside the archive, and the server points transcribe.cpp at them because the OS loader cannot read an asar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Relative to document.baseURI it resolved under the current thread route and hit the SPA fallback (MIME type mismatch), so recording never started. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
T3 Voice ran as a separate Python app that drove T3 Code from the outside (UI Automation, a floating mic button, clipboard paste). This builds the same dictation into T3 Code itself, working the way T3 Voice does with Parakeet.
How it works
apps/server/src/dictation/): Parakeet TDT 0.6b v3 throughtranscribe-cpp(npm, koffi, prebuilt). The.gguffrom Scrawl or Hex is picked up (T3CODE_DICTATION_MODELoverrides). It loads on the first audio chunk while the user already speaks and is let go after 15 minutes unused; one model serves every client. Filler sounds are removed; ending with "Reinschrift" asks for a structured rewrite.packages/contracts/src/dictation.ts):dictation.append(base64 16 kHz PCM every 0.5 s, returns a live preview of the last 20 s),dictation.finish,dictation.cancel,dictation.structure(claude --print --model haiku, prompt overridable at<T3 home>/dictation/structure-prompt.md). Scope:orchestration:operate.public/(desktop CSP blocks blob: worklets) resamples to 16 kHz.transcribe-cpp/koffistay external like node-pty; their DLLs are unpacked fromserver.asarand the server points transcribe.cpp at the unpacked copy.Surfaces
http://<LAN IP>cannot dictate.FORK.md→ Fork features → Dictation.Verified
vp test run apps/server/src/dictation: 41 tests (filler/codeword cases ported from T3 Voice, model ranking, engine lifecycle). Typecheck web/server/client-runtime/shared, targeted lint: clean.T3-Code-0.1.0-x64.exe): Parakeet loads fromserver.asar.unpackedunder Electron's Node.🤖 Generated with Claude Code