8000 Add ChatGPT Web dictation to the titlebar by nicolasjandre · Pull Request #438 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Add ChatGPT Web dictation to the titlebar - #438

Merged
amirlehmam merged 7 commits into
amirlehmam:masterfrom
nicolasjandre:feat/chatgpt-web-dictation
Nov 6, 2026
Merged

amirlehmam merged 7 commits into
amirlehmam:masterfrom
nicolasjandre:feat/chatgpt-web-dictation

Conversation

@nicolasjandre
Copy link
Copy Markdown
Contributor

Summary

Add ChatGPT Web dictation to the window titlebar, immediately before Keep Computer Awake. Start recording, click Stop, and append the completed transcript to the original terminal without submitting it. This removes the repeated browser → dictate → copy → terminal → paste workflow for Codex, Claude Code, and other terminal applications.

  • Compact microphone / Stop / cancel controls keep the same dimensions; animated dots below the cancel X indicate processing.
  • Successive recording cycles append at the terminal cursor. No automatic silence segmentation or Enter is sent.
  • Voice settings provide a dedicated ChatGPT sign-in window, connection status, and microphone selection. The configurable shortcut lives in Settings → Shortcuts, defaults to Ctrl+Shift+S, and appears in the button tooltip.
  • English, French, and Portuguese UI follow the existing localization system.

Motivation and usage limits

The contributor prefers ChatGPT's transcription quality, especially for their Portuguese development workflow. This exposes that existing workflow at the terminal level without requiring an OpenAI API key or an agent-specific voice feature.

The integration operates the regular signed-in ChatGPT website's dictation controls and never submits a ChatGPT message or invokes a Codex task to transcribe. OpenAI describes dictation as editable text returned before sending a message and documents regular Chat Voice separately from Codex usage. These are not a promise of unlimited transcription: website availability, account restrictions, and service limits still apply. Sending the resulting prompt to a terminal agent has that agent's normal usage implications.

We checked the proposed comparison with Claude Code: Anthropic explicitly states that Claude Code dictation does not consume messages or tokens and does not count toward /usage. This PR therefore makes no quota-saving claim over Claude Code's built-in dictation. Its benefit is transcription preference and a shared workflow across terminal applications.

Boundaries

  • Uses actual website UI controls, with no private transcription endpoints, API keys, copied browser cookies, or wmux preload in the website.
  • Dedicated persistent Electron session; sign-in redirects and HTTPS authentication popups remain in that session.
  • Requires positive sign-in before capture. Microphone permission is scoped to owned ChatGPT content during explicit capture/device actions; no video permission.
  • Binds output to the original terminal lifetime, bypasses broadcast input, normalizes text, and rejects terminal control characters. If that terminal disappears, completed text can be recovered manually.
  • Navigation, cancellation, stale asynchronous operations, and ambiguous website states fail closed.
  • Website-dependent adapter, not a supported stable transcription API; website markup or experiments may require maintenance.

Validation

  • Main and renderer production builds, resource verification, and git diff --check pass.
  • Full suite with WMUX_REQUIRE_BUILD=1: 6,528 passed, 93 skipped, 1 failed. The remaining failure is the existing Windows environment-dependent pty-manager.test.ts assertion that a real pwsh.exe exists; the same failure was observed before this feature.
  • Feature regression coverage includes account gating, website completion checks, permission ownership, cancellation races, navigation, targeted paste delivery, shortcut migration, and compact UI states. Changed feature modules passed targeted lint; repository-wide lint has existing failures.
  • Contributor manually verified real microphone → Stop → transcript insertion in the development app and confirmed the feature works. Runtime checks also verified equal button dimensions, animated dots placement, shortcut toggling, and tooltip binding.
  • Non-default physical audio devices and a separate Claude-specific end-to-end matrix have not been manually verified.

Usage and troubleshooting: docs/chatgpt-web-dictation.md.

@richardaubin
Copy link
Copy Markdown

If I understand this correctly, this should probably be a plugin or at the very least an option with disabled (do not show) as the default.

@nicolasjandre
Copy link
Copy Markdown
Contributor Author

That makes sense. Some context behind this contribution: I injured my left arm and currently can’t use it, so typing with only my right hand would be quite unproductive. This led me to use dictation much more frequently than before, which motivated this feature. I’m already using a local wmux build with it, and it’s been helping me a lot.

I’m not sure where the right boundary is for wmux—whether this belongs in the core application, as an optional feature, or as a plugin. Some terminal applications now include dictation, and with voice-driven development and vibe coding becoming more common, I thought this could be useful to others too.

My goal is to contribute something helpful to the community. I’m happy to make it opt-in, disabled and hidden by default, or adjust the implementation in whatever way the maintainers consider appropriate for accepting the PR.

- Add workspacePrefs.dictationEnabled (default false). Off, the titlebar has
  no microphone and the Voice tab never refreshes, so wmux never loads
  chatgpt.com.
- Leave Start or stop dictation unbound by default instead of claiming
  Ctrl+Shift+S from terminal programs; drop the rev-2 shortcut promotion,
  whose Ctrl+Alt+V default never shipped.
- Re-check the account on window focus only after the user opened the
  sign-in window, rather than on every focus of every window.
- Drop the planning and spec drafts from docs/superpowers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amirlehmam
Copy link
Copy Markdown
Owner

Thanks @nicolasjandre, and sorry about your arm. I pushed one commit on top so this can ship as the opt-in feature you and @richardaubin discussed:

  • Off by default. A new Settings → Voice → Enable ChatGPT dictation toggle. While it is off, the titlebar has no microphone, the Voice tab only shows the toggle, and wmux never loads chatgpt.com.
  • No default shortcut. Start or stop dictation is unbound by default, so a hidden feature doesn't take Ctrl+Shift+S away from terminal programs. You can bind it in Settings → Shortcuts. The rev-2 promotion is gone with it, since the Ctrl+Alt+V default it migrated from never shipped.
  • No background loads. The account re-check on window focus only arms after you open the sign-in window. Before, the first IPC call registered it on every focus, and each refresh loads chatgpt.com.
  • Dropped the planning and spec drafts under docs/superpowers/. docs/chatgpt-web-dictation.md documents the toggle.

Type check, both builds and the full unit suite pass. Merging now; it ships in the next release.

@amirlehmam
amirlehmam merged commit cd1e4f7 into amirlehmam:master Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0