- Rust 78.5%
- JavaScript 6.6%
- TypeScript 4%
- HTML 4%
- Shell 2%
- Other 4.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* iOS keyboard: log each step from the Hex key's touch-down to the first audio
In-keyboard dictation can lose the first words: nothing said how long the
microphone takes to open after the Hex key, or where that time goes.
What changed
- HexKeyControl reports touch-down (onPress, from the touch's own timestamp)
through KeyboardViewModel.onHexKeyPress, before it is a tap, hold or slide.
- KeyboardLocalDictation keeps a CaptureTimeline per start and, at the first
audio buffer, writes one probe-log line: the touch-down, the start call,
the web view made, its page loaded, hexStart evaluated, the device list,
getUserMedia, the stream kept, the audio context running, "started" and
the first buffer, all in ms after touch-down. The page reports its own
steps with Date.now(). "first audio" is the first buffer less its 4,096
samples.
- A warm Hex session (Keep mic warm) start logs when Hex's recorder ran
(the snapshot's recordingStartedAt), when the command was sent and when
the keyboard saw it, from touch-down.
No behaviour changes.
Measured (anomastudio, iPhone 13 simulator, iOS 27.2, Release, Hex keyboard
in Messages, AXe taps of 100 ms and holds of 1.5 s; median of 5 tap and 3
hold runs, first dictation in a fresh keyboard process, then a second):
tap, first dictation 862 ms (849-961)
tap, second 154 ms (150-157)
hold, first 1160 ms (1143-1161)
hold, second 374 ms (373-377)
In a first dictation the web view's page takes 620-690 ms to load and
getUserMedia ~50 ms; a tap starts ~150 ms after touch-down (the lift) and a
hold ~370 ms (the 350 ms hold timer).
Verified: Release build for the simulator; the log lines above come from it.
* iOS keyboard: load the capture page when the keyboard opens, not on the Hex key
The first in-keyboard dictation after the keyboard opened waited 620-690 ms
for its capture web view's page to load before getUserMedia could even be
asked, so the first words were lost.
What changed
- KeyboardLocalDictation.prepare(in:) makes the capture web view and loads
its page ahead of time. It asks for nothing else: no getUserMedia, no
audio context, no audio session change, so the microphone stays closed
and no orange dot shows until a dictation starts. It is skipped below the
32 MB a first dictation needs (#2045's guard; that dictation opens Hex
instead) and when neither the keyboard nor Hex has the microphone allowed.
- KeyboardViewController calls it a main-queue turn after viewDidAppear (so
the keyboard's first frame never waits for it), only with Full Access, with
in-keyboard dictation available and no warm Hex session (which takes the
Hex key instead).
- A capture page whose content process ends while nothing records is now
dropped quietly and made again by the next start. Before, the last
dictation's handler still ran and showed a microphone error while idle;
a prepared page lives the whole keyboard session, so this matters now.
A recording that loses its page still fails as before.
- The probe log notes "capture prepared" (the main-thread time to make the
web view) and "capture page loaded", with memory.
Measured (anomastudio, iPhone 13 simulator, iOS 27.2, Release, Hex keyboard
in Messages, 100 ms AXe taps, 3 runs, touch-down to first audio):
first dictation 862 ms (849-961) before -> 282 ms (262-309)
second dictation 154 ms (150-157) before -> 144 ms (144-148)
Memory (phys_footprint, simulator, no GPU memory counted):
idle 3 s after the keyboard shows 27.4-27.6 MB -> 31.8-32.0 MB
lifetime peak by the first audio 40.2-40.8 MB -> 40.7-41.2 MB
The page load itself peaks at 39.0-40.7 MB while idle. Making the web view
takes 46-112 ms of the main thread once per keyboard, right after it shows.
Verified: Release simulator build and the runs above; the probe log shows
no getUserMedia or capture start until the Hex key is pressed.
* iOS keyboard: start in-keyboard dictation on the Hex key's touch-down
A tap only started capture when the finger lifted (~100-150 ms) and push to
talk only after the 0.35 s hold timer, so the first words were lost even
with the capture page ready.
What changed
- The full keyboard's Hex key reports touch-down (onPress) and a press that
becomes a slide to the style menu or is cancelled by the system before it
is a tap or a hold (onPressAbandoned; HexKeyGesture.cancel() now returns
.abandon for a pending press, .ignored once the hold fired).
- KeyboardViewController arms in-keyboard dictation at touch-down, with the
same checks the Hex key uses to pick it (Full Access, no warm session,
in-keyboard dictation available) and only while idle or failed.
- KeyboardLocalDictation.arm opens the microphone at once in a new .armed
phase that the UI doesn't see (no snapshot). start() keeps it as the
dictation (a tap's lift or the hold), so tap and push to talk behave as
before, only listening from touch-down. discard() stops it, deletes its
audio and transcribes nothing: on the menu, a cancelled touch, the
keyboard hiding, a warm session taking over, or 3 s without a tap or hold.
A failure while armed is shown only if the touch is kept.
- The capture page's hexStart now notices a hexStop that came while it
awaited getUserMedia or the audio context (a generation count) and
releases what it opened instead of going on; before, a stop during
getUserMedia left the microphone open until Swift stopped it again on
"started". A page that is idle after cancel() or discard() keeps
listening for its process ending, and closes a stray "started".
- README: listening from touch-down, the dot during a slide, and what only
an iPhone can measure.
Measured (anomastudio, iPhone 13 simulator, iOS 27.2, Release, Hex keyboard
in Messages, 100 ms AXe taps and 1.5 s holds; touch-down to first audio,
median and range; "before" is
|
||
| .cargo | ||
| .cloudflare/cache | ||
| .config | ||
| .github | ||
| android | ||
| app | ||
| assets | ||
| crates | ||
| design | ||
| docs | ||
| ios | ||
| macos/HexMicrophoneDriver | ||
| native | ||
| nix | ||
| packaging | ||
| perf | ||
| prototypes/app-shell | ||
| release-notes | ||
| resources | ||
| scripts | ||
| sdk | ||
| site | ||
| skills/hex-personal-commands | ||
| src | ||
| tests | ||
| .gitignore | ||
| .hivemind.toml | ||
| .markdownlint-cli2.jsonc | ||
| AGENTS.md | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| ROADMAP.md | ||
| SECURITY.md | ||
| strobe.json | ||
| THIRD_PARTY_NOTICES.md | ||
Hex
Hex is local voice dictation for Mac, Windows and Linux. Hold a key, speak, and it pastes.
How it works
- hold the shortcut, speak, then let go
- Hex transcribes on your device and pastes into whatever app you're in
- the first run downloads a speech model; after that nothing leaves your machine
- experimental features live in Labs, at the bottom of the sidebar
What it does
- hold the shortcut to dictate, or set Shortcut mode to Tap to start and stop with a press
- the text lands at the cursor in whatever app you're in
- Option-Shift-V pastes the last dictation again (Ctrl-Alt-V on Windows and Linux)
- History keeps your dictations, searchable, for 7 days by default
- Output runs every dictation through steps you choose (word replacements, built-in cleanups, your own scripts, an optional OpenCode rewrite), with different steps per app or website
- Vocabulary is one list of names Hex should know; Whisper and Qwen3-ASR read it while transcribing, Parakeet models read it with Labs › Vocabulary help on, and the OpenCode rewrite uses it
- Annotate records the screen while you draw and talk, on macOS, Linux and Windows (GNOME Wayland needs Labs › Annotate on GNOME)
- an authenticated local API and the TypeScript SDK transcribe with the same model, for your own tools
- Meetings is a macOS lab that records a call and writes the transcript
Output and History:
Speech models
Hex downloads one model the first time it runs and transcribes with it on your
machine from then on. On an English system that's Parakeet Unified English: it
writes while you talk, so the text is ready when you let go. Other languages
start with the model recommended for them. That model also serves meetings and
hex transcribe.
Settings' picker offers more, among others:
- Parakeet v3: 25 European languages, and it hears which one you speak
- Cohere Transcribe: the fewest wrong words, in 14 languages; a big download
- Whisper large-v3-turbo: almost any language, and it reads your vocabulary
- Qwen3-ASR 0.6B: Chinese and 29 more, and it reads your vocabulary
- SenseVoice Small: Chinese, Japanese, Korean and English; a small download
- Nemotron 3.5 ASR: writes while you talk, in 27 languages
- Granite Speech 5.0: IBM's model, seven languages, with punctuation
- one-language models: ivrit.ai Whisper for Hebrew, GigaAM v3 for Russian, NB-Whisper for Norwegian, KB-Whisper for Swedish, QwenCleo-ASR for Egyptian Arabic
- more English models: Parakeet v2 and Underdog Bark 3.0
Add a GGUF model of your own with "Add model file…" in the picker; see your own speech models.
Downloads
Stable is the current release. Dev is the newest build of dev and updates
itself from the dev channel.
| Platform | Stable | Dev |
|---|---|---|
| macOS (Apple silicon) | DMG | DMG |
| Windows x64 | Installer | Installer |
| Windows ARM64 | Installer | Installer |
| Linux x86_64 | Executable | Executable |
| Linux x86_64 (Debian, Ubuntu) | .deb | .deb |
| Linux x86_64 (Fedora, openSUSE) | .rpm | .rpm |
| Linux ARM64 | Executable | Executable |
| Linux ARM64 (Debian, Ubuntu) | .deb | .deb |
| Linux ARM64 (Fedora, openSUSE) | .rpm | .rpm |
Or install with:
- Homebrew:
brew install --cask anomalyco/tap/hex - AUR:
yay -S hex-bin - install script (Linux):
curl -fsSL https://anoma.ly/hex/install-linux.sh | sh - Nix (Linux):
nix profile add github:anomalyco/hex
Command line
hex transcribe meeting.m4a prints a recording's transcript, whether or not
the app is running. It reads WAV, AIFF, CAF, FLAC, MP3, Ogg, WebM, and
MP4/M4A/MOV, including a video's soundtrack. The same hex controls the
running app (hex status, hex dictation, hex settings); see
docs/cli.md.
On macOS the CLI is inside the app. Homebrew links it for you; otherwise link
it somewhere on your PATH that you own:
ln -s /Applications/Hex.app/Contents/MacOS/hex ~/.local/bin/hex
Linux and Windows installs put hex on your PATH.
More docs are in docs/.
Contributing
We don't take pull requests. Open an issue describing the bug or idea, and our agents usually turn it around fast.
MIT licensed.