Repository navigation
feat: transcribe dictation into the channel composer - #473
Merged
Merged
Conversation
The composer's mic button now runs WebKit/Chromium speech recognition and writes the transcript, interim words included, into the editor while the recording glow shows. The desktop app declares microphone and speech recognition usage strings and the audio-input entitlement its hardened runtime needs. Why: packages/ui/src/hooks/use-dictation.ts#function useDictation | deactivating aborts and detaches handlers, so no result lands after Stop or Send moves the editor on Why: apps/desktop/electrobun.config.ts | WKWebView dictation needs NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription in Info.plist, or macOS ends the app on first use
3 of 4 tasks
This was referenced Oct 16, 2026
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.
Part of #38.
The channel composer's mic button now dictates. Pressing it starts the platform's speech recognition (
webkitSpeechRecognition) and writes the transcript into the editor at the cursor as you speak, interim words included, while the existing recording glow (useMic/Composer.Glow) runs. Stop, Send, or silence ends it.packages/ui/src/hooks/use-dictation.ts: a smalluseDictation(active, onText, onEnd)pluscanDictate. Turning it off aborts the recognizer and detaches its handlers, so no late result can land in an editor that has already moved on. The words you saw last stay in the editor.ChatComposer:micnow means "dictate where the runtime can". It is gated oncanDictate, so Firefox and other browsers without speech recognition never show the button. The existing submit, record, and stop states, the glow, and the red ring are reused unchanged.apps/app/src/composer.tsx: enablesmicfor channel chats. The dashboard's new-channel composer keepsmic={false}for now because another change is in flight in that file.electrobun.config.tsdeclaresNSMicrophoneUsageDescriptionandNSSpeechRecognitionUsageDescription. Electrobun writes both into Info.plist, which I checked on a dev build.native/entitlements.plistaddscom.apple.security.device.audio-input, which release builds need because they sign with the hardened runtime.Product decisions
navigator.language.Verification
webkitSpeechRecognitionis present, andstart→audiostart→speechstart→ interim results → final result all worked with live speech, as long as the window was visible. If the page isn't visible, it fails withnot-allowed: Page is not visible to user.bun desktop dev) builds. Its Info.plist has both usage strings, and its signature carriesaudio-input.getUserMediarunning at the same time as recognition inside WKWebView. Electrobun's own "This page wants to access your microphone" alert may also show before the macOS prompts.bun typesandbun run cipass.Remaining for #38
Built in Ace
Built with Claude Code outside Ace, in a session already running there; no Ace gap involved.