Repository navigation
feat: Windows beta with streaming dictation, Hold/Toggle shortcut mode, and x64 + ARM64 release - #141
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Hona
force-pushed
the
windows-streaming
branch
from
October 19, 2026 00:49
af193fa to
ad9d9a5
Compare
…e, and release pipeline Ports the windows-shell branch onto main, adds a GPU streaming finish for Parakeet Unified English with a whole-clip fallback, a cross-platform Hold/Toggle shortcut mode, x64 and ARM64 Windows CI and release feeds, and the website Windows download.
…ws-only device query
…dows The Windows port carried its own copies of modules main already has. Each concept now has one implementation: - UI: Windows uses main's design system (design_tokens, desktop_ui, text_input, desktop_transcription_picker types) instead of a Fluent copy. Windows-only bits are small cfg additions: Segoe Fluent Icons for Icon, Windows text-editing key bindings, fixed-height and read-only text inputs, and the shared slider_track component. windows_ui keeps the window chrome and the anchored dropdowns, now drawn with menu/menu_item. - Windows chrome: the sidebar runs the full window height as on macOS. The caption row is split: the brand sits over the sidebar, the window buttons over the content, and both halves stay OS drag regions. - Commands: Windows uses main's commands, command_grammar, context, keys, and personal_commands. The SDK provisioner accepts the embedded TypeScript src layout; Windows execute() opens URLs and paths with ShellExecuteW. - OpenCode: dictation_processor is the one client and ordered policy (corrections, rewrite, transformations) on macOS and Windows. Windows keeps its opencode2 api CLI transport in a cfg'd submodule; the ranked catalog, prompts, Voice Action generation, and the transformation stage are shared. - desktop_activity is shared; the Windows Settings contract is windows_desktop_host, without #[path] aliases. - self_update is the signed-feed core for both the Linux and Windows updaters. - Windows copy follows the design system: sentence case and "Hex".
Hona
force-pushed
the
windows-streaming
branch
from
October 19, 2026 01:00
507eb21 to
30a735e
Compare
Hona
added a commit
that referenced
this pull request
Oct 19, 2026
The keyboard-layout test harness includes src/keyboard.rs, which now imports crate::keys, and personal_commands::workspace_configured is only called on Windows. Adds a Check macOS workflow so this can't regress silently.
Hona
added a commit
that referenced
this pull request
Oct 19, 2026
* fix(macos): restore the macOS build broken by #141 and check it in CI The keyboard-layout test harness includes src/keyboard.rs, which now imports crate::keys, and personal_commands::workspace_configured is only called on Windows. Adds a Check macOS workflow so this can't regress silently. * fix(linux): allow the hotkey worker entry points their eighth argument
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.
Hex on Windows: the
windows-shellport revived onto currentmain, a GPU streaming finish so release-to-paste stays under ~100 ms after minutes of talking, a cross-platform Hold / Toggle shortcut mode, and the x64 + ARM64 release pipeline.Streaming finish (Windows, GPU)
The whole clip used to be decoded after release, so the wait grew with dictation length. Parakeet Unified English is a buffered-streaming model, so audio is now fed to it while the shortcut is held. Release only decodes the last ~1–2 s.
sequenceDiagram participant K as Shortcut participant C as Capture (16 kHz) participant E as Engine thread participant P as Paste worker K->>C: press (450 ms pre-roll kept) C->>E: Begin (after the hold threshold, or on press in Toggle) loop every 160 ms C->>E: Feed(samples) end K->>C: release C->>C: collect 200 ms tail C->>E: Finish(stream, complete clip) E->>E: feed remainder, then finalize alt stream healthy E-->>P: text (source=stream) else failed, empty, overfed, or over 1.5 s E->>E: transcribe whole clip E-->>P: text (source=fallback) endsrc/transcription_engine.rs) owns the model and runs every inference in FIFO order. A liveStreamholds the model's compute lease, so a concurrent offline run would getBusy.DictationCapture::recorded_fromexposes the live 16 kHz recording in final-clip coordinates, so the stream sees exactly the samples the fallback would. This is tested at 16, 44.1 and 48 kHz.probe_streamstreams one silent second at load, which also prewarms the stream graph. CPU devices, including ARM64, keep the whole-clip path.RunOptions(language, punctuation), minus the Whisper-only run extension.HEX_STREAMING=0forces the whole-clip path;HEX_STREAM_CHUNK_MSoverrides the chunk and right context, for benchmarks only.model stream-bench <wav> [--speed N]replays a WAV in real time and prints both paths' latency and word differences.transcribe-cppstays=0.2.4. 0.4.0 has the same streaming API and Parakeet buffered code, but changescapabilities()to return aResultand addsOutputRepetitionerrors on the offline path.Windows port
The
windows-shellbranch had regroupedsrc/intocommon/,desktop/,platform/andspeech/;mainstayed flat. The port brings the branch's Windows modules ontomainas flat files rather than rebasing 146 commits through that move, and keeps one implementation per concept: Windows consumesmain's modules and the #138 design system, with smallcfg(windows)additions instead of copies.flowchart LR subgraph shared["Shared by macOS, Linux, Windows"] core["audio, dictation, events, history, feedback"] speech["transcription_models, gguf_session, local_transcriber"] ui["design_tokens, desktop_ui, text_input, transcription picker, desktop_activity"] proc["dictation_processor (OpenCode client and ordered processing)"] cmds["personal_commands, commands, command_grammar, context, keys"] upd["self_update (signed feeds; Linux and Windows)"] end subgraph win["Windows only"] shell["windows_app, windows_ui, windows_desktop_host"] loop["windows_dictation, windows_input, windows_paste"] misc["windows_settings, windows_updater, windows_indicator, windows_context"] engine["transcription_engine"] panes["desktop_* panes from the port (Modes, History, onboarding, model catalog)"] end win --> sharedwindows_personal_commands3,796personal_commandscommands_engine1,403,command_grammar_common1,104,command_context142commands,command_grammar,context, sharedkeysopencode1,146,dictation_processing565,windows_voice_action31dictation_processor; only the transport differs (curl on macOS,opencode2 apion Windows)windows_desktop_ui994,windows_text_input1,531, picker 476, activity 170design_tokensanddesktop_ui,text_input, picker,desktop_activityself_updateandlinux_updaterself_update, used by bothlocal_transcriber: renamed fromlinux_transcriberand shared by Linux and Windows. It gains recognition hints,install(selection),transcribe_wav_with_selection, the stream probe andwith_stream.main's 200 ms post-release tail with stall grace, the near-silent gate, and warm-timeline ingest.audio,app_paths(command SDK embedded per content hash),feedback,transcription_models(available_models,language_for_model,recommended_selection,uninstall,atomic_replace).bun update @hex/commandsand allow deep-link URLs, opened throughShellExecuteWrather thancmd /C start.dictation_indicator. Sharing it means rewriting the Metal HUD.app_window's inline panes. That's the shared-desktop-UI roadmap item; each of those files carries aTODO(consolidate-screens)pointing at its macOS counterpart and 75f859b (feat(ui): consolidate the desktop design system #138).windows_desktop_hostvs Linux's socket-backeddesktop_host; the two are different contracts.service); it's tracked indocs/windows.md.Windows fixes found while porting
write_json_atomicallyflushed through a read-only handle and opened the parent directory. Windows rejects both. Addedsync_file(writable handle) andsync_directory(a no-op on Windows; NTFS journals renames).model installcrashed with a stack overflowsha256_hexkept a 1 MB buffer on the 1 MB main-thread stack. It's on the heap now.pane_content()lackedmin_w(0), and GPUI measures text min-content as the unwrapped line. Long right-hand row values are now capped.voice-controlwith no iconbuild.rsembedsresources/windows/hex.icoand aVERSIONINFO(2.2.0) throughembed-resource. The window and taskbar load that same icon: a flat tile that stays crisp at 16–64 px (scripts/windows-icon.ps1).conflicted_escape_fallback_releases_partial_grabs)grab_variantsreleased a partial grab without waiting for the X server, so another client could race it into an Access error. It now waits for eachUngrabKey.set_modified. Two Unix-semantics tests arecfg_attr(windows, ignore).Hold / Toggle shortcut mode (macOS, Linux, Windows)
Settings → Dictation → Shortcut mode sits directly above the shortcut row.
DictationHotkey::set_toggleinsuppression.rs.CaptureState.toggleinwindows_input.rs.toggleflag on the X11 loop and the WaylandHotkeyState.shortcut_mode: "hold" | "toggle"in each platform's settings file. Files without it load ashold.Windows look
Windows renders with
main's design system (#138): the same tokens, controls and sentence-case labels as macOS, with Segoe UI. The sidebar now runs the full window height, matching macOS, and the custom caption row is split over the sidebar and content columns. Both halves stay drag regions, and min/max/close keep their hit-test areas for snap layouts.Enabled / Disabled status (Windows and Linux)
Release
flowchart LR PR[pull request] --> CW[check-windows.yml] CW --> X["x64 on windows-latest<br/>Vulkan SDK, SPIRV-Headers, fmt, clippy, test, build<br/>assert no VC++ runtime imports"] CW --> A["ARM64 on windows-11-arm<br/>clang-cl and Ninja, test, build"] R["release-windows.sh<br/>HEX_WINDOWS_ARCH = x86_64 or aarch64"] --> R2[("downloads.hex.kitlangton.dev")] R2 --> F1[windows-update.json] R2 --> F2[windows-aarch64-update.json] I[install-windows.ps1] -->|AMD64| F1 I -->|ARM64| F2release-windows.yml: tag-only, x64, unsigned zip to GitHub Releasescheck-windows.ymlon every PR and onmain: x64 + ARM64. Signed publishing stays manual inrelease-windows.sh..cargo/config.tomlsets+crt-staticandCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded. Onlyvulkan-1.dllon x64, which the GPU driver provides.GGML_NATIVEdefaulted ON (tuned to the build machine)TRANSCRIBE_CMAKE_ARGS=-DGGML_NATIVE=OFFin CI and releasespub-…r2.devdownloads.hex.kitlangton.dev, same bucket and key as Linux and macOSwindows-update.jsonwindows-aarch64-update.jsonvulkan-1.dllwith a clear driver messagedocs/windows.md#install); title and meta mention Windowsrelease-windows.sh prepare/publishfor each architecture after merge. ARM64 is best built on an ARM64 host.Docs
docs/windows.md: now titled "Windows Beta", with Install, Streaming Dictation and per-architecture source-build sections, and an updated parity table.docs/features/dictation.md: new Shortcut Mode and Streaming Finish sections with measured evidence.docs/features/README.md): new Windows platform entry.AGENTS.md: new modules and invariants, plus Windows release steps.README.md: new Windows Beta section and log location.ROADMAP.md: Single-tap to lock mode missing from Rust re-write #77 (single-tap hands-free activation) is now implemented; its remaining checks are listed.Not verified
cargo testandcargo clippy --all-targets -- -D warningson a Mac before merge. macOS-compiled files touched:main.rs.app_settings.rs,app_window.rs,suppression.rs,recognition.rs.dictation.rs,dictation_processor.rs,parakeet.rs.personal_commands.rs,commands.rs,command_grammar.rs,context.rs,config.rs.keyboard.rs,keys.rs,text_input.rs,text_replacements.rs.desktop_ui.rs,design_tokens.rs.check-linuxbuilds and tests it, including the Xvfb grab tests; Toggle and the new status copy haven't been run on a physical Linux desktop.opencode2wasn't installed on the test machine.