Skip to content

feat(chat): dictate into the composer with local speech-to-text - #253

Merged
badcuban merged 2 commits into
mainfrom
threadlines/research-free-composer-dictation
Sep 6, 2026
Merged

feat(chat): dictate into the composer with local speech-to-text#253
badcuban merged 2 commits into
mainfrom
threadlines/research-free-composer-dictation

Conversation

@badcuban

@badcuban badcuban commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

What Changed

  • A push-to-talk mic in the composer, between the attachment button and the send button. Hold it to talk and let go, or turn "Hold to record" off and click to start and stop. The words land at the cursor.
  • The chevron next to the mic opens the microphone list and the hold switch, with a settings shortcut in the label row. Phones show the mic only.
  • Transcription runs on the Threadlines server with sherpa-onnx in a child process. Two models: Parakeet TDT 0.6B v2 (default, best accuracy, 631 MB) and Moonshine tiny (small and fast, 120 MB). The native runtime comes from the npm registry and the model files from Hugging Face, downloaded on first use into ~/.threadlines/models/speech. Nothing is bundled and no audio leaves the machine.
  • Settings › General › Dictation: pick the model, download or remove it, see the disk it uses, and the hold switch.
  • Errors show as one line in the composer's notice dock.
  • The Codex realtime voice button is no longer rendered. Its code stays.
  • Desktop: microphone entitlement and usage description on macOS, and an audio-only media permission handler for the app window.

Why

The old realtime voice mode needed paid API access and had been switched off, which left a dead mic slot and no way to speak a prompt. Local speech-to-text is free, private, works on every provider and both clients, and the worker-process design keeps a native crash or a slow model load away from the server's event loop.

Benchmarks on a 12700K for a 16 s clip: Parakeet 1.3 s, Moonshine 0.7 s; pinned to two efficiency cores as an old-PC proxy, 4.5 s and 1.7 s. Both transcribed the clip word for word.

UI Changes

Screenshots of the mic states, the options menu, the setup popover, and the Settings group to be added from the dev app.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Sep 6, 2026 7:07pm UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 6, 2026
@badcuban
badcuban enabled auto-merge September 6, 2026 16:38
There was no way to speak a prompt. The old Codex realtime voice mode
needed paid API access and had been switched off, leaving a dead mic slot.

The composer now has a push-to-talk mic. Audio goes to the Threadlines
server, which runs sherpa-onnx in a child process with a locally
downloaded model (Parakeet by default, Moonshine as the small option).
The native runtime and the model files are downloaded on first use, so
nothing is bundled and nothing leaves the machine. The model is picked in
Settings › General › Dictation; hold-to-record and the microphone are
per-device client settings. The realtime voice button is no longer
rendered; its code stays.
@badcuban
badcuban force-pushed the threadlines/research-free-composer-dictation branch from 51e89ab to 5ca62b0 Compare September 6, 2026 17:14
@badcuban
badcuban added this pull request to the merge queue Sep 6, 2026
Merged via the queue into main with commit 8b5e31d Sep 6, 2026
16 checks passed
@badcuban
badcuban deleted the threadlines/research-free-composer-dictation branch September 6, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant