No description
  • Rust 78.5%
  • JavaScript 6.6%
  • TypeScript 4%
  • HTML 4%
  • Shell 2%
  • Other 4.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 8c93f6f593
iOS: autocorrect splits merged words, fixes missing apostrophes and homophones, and corrects before punctuation (#2144)
* iOS: punctuation after a word fixes its typo, as space does

X (Erick): "If I add punctuation after a typo autocorrect does not fix the typo."
Only space ran autocorrect, so "teh," or "recieve." kept the typo. Now a mark
that closes a word (, . ! ? ; : ) and ") runs the same correction as space,
from the 123 page or a 123 slide, and goes in after the fix ("the,"), as the
system keyboard does. One backspace right after takes back the mark and the fix
("teh"), the same as after a space, and the kept word isn't corrected again.
A period never corrects a common abbreviation (approx., etc., dept.) and a
swiped word is never corrected (it is a reading, not a typo).

Verified: new FullKeyboardEngineTests (testPunctuationAfterATypoFixesItFirst,
testPunctuationNeverChangesASwipedWord) pass on an iOS 27.2 simulator. Autocorrect
benchmark (Spatial autocorrect on): a new 300-sentence punctuation set goes from
12.40% to 7.10% WER and 96 to 177 sentences exactly right; the held-out sets are
unchanged (EN 5.94%, ES 8.61% WER; 79 and 23 correct words broken).

* iOS: contractions typed without the apostrophe follow the words around them

X (Erick): "the id in this didn't autocorrect to I'd". Words that are real words
both with and without an apostrophe (id/I'd, ill/I'll, hell/he'll, shell/she'll,
wed/we'd, lets/let's, well/we'll) were only offered in the strip and never
changed. Now English picks between them with the typing model's word pairs,
scoring a contraction as the words it stands for ("I'd like" as "I would like"),
which the pairs know far better than the contraction itself:

- At the word's own space, when the word before makes it clear ("yes id" ->
  "yes I'd", "id like" at a sentence start -> "I'd", "the id" stays).
- At the next word's space or closing mark, the word before is revised when the
  next word decides it ("well see" -> "we'll see", "well done" stays), as the
  system keyboard does. A contraction whose last word ("will", "would", "had",
  "us") the next word never follows is evidence against it, so "till hell
  freezes" keeps "hell".

One backspace right after a revision puts back both words as typed and keeps
them. Words you kept, learned words, Contacts names and other languages are
never changed, and nothing changes without the bundled typing model.
"were/we're" stays suggest-only: the pairs can't tell them apart. Undo now
records each changed word (AppliedCorrection.changes), so a revision's undo
keeps both words; a single correction behaves as before.

Margins, the sentence-start bonus (3 nats) and the missing-follower penalty
(5 nats) were tuned on Tatoeba sentences outside the held-out sets.

Verified: AutocorrectEngineTests (testContractionsWithoutTheApostropheFollow
TheWordsAroundThem, testOneBackspaceTakesARevisionBack) and the rest of
AutocorrectEngineTests and FullKeyboardEngineTests pass (113 tests, iOS 27.2
simulator). Benchmark: EN held-out WER 5.94% -> 5.72% with correct words broken
79 -> 79; ES unchanged (8.61%, 23); the contraction set 7.29% -> 5.61%; engine
p95 per letter tap 2.5 ms.

* iOS: its/it's, your/you're, there/their/they're and then/than follow the context

X (Justin): "It doesn't seem to understand grammar. Its vs it's for instance."
Autocorrect never chose between words that sound alike, so "its a nice day",
"your welcome", "their is", "more then that" stayed wrong. These groups now join
the contraction groups from the previous change and are chosen by the typing
model's word pairs at the word's own space or, when the word before can't tell,
revised at the next word's ("its a" -> "it's a", "i think its broken" -> "I think
it's broken", "they lost there keys" -> "they lost their keys", "and than we" ->
"and then we"), with the same undo: one backspace puts back what you typed.
"the dog wagged its tail" and "on its way" stay.

"it's", "you're" and "they're" are scored as "it is"/"it has", "you are", "they
are". The missing-follower penalty now applies only after "will", "would", "had"
and "us": the pairs rarely list the adjectives after "are" ("you're funny"), so
it broke right words there. A word you typed with your own apostrophe is never
changed or revised. The next-word margin for a change of letters (their/there,
then/than) is 3 nats, tuned with the others on Tatoeba sentences outside the
held-out sets.

Verified: AutocorrectEngineTests.testSoundAlikeWordsFollowTheWordsAroundThem and
the rest of AutocorrectEngineTests and FullKeyboardEngineTests pass (114 tests,
iOS 27.2 simulator). Benchmark: EN held-out WER 5.72% -> 5.48% with correct
words broken 79 -> 79; ES unchanged (8.61%, 23); a 200-sentence set with the
wrong homophone typed 14.08% -> 5.86% and one with the right one 6.33% -> 4.08%;
engine p95 per letter tap 2.3 ms.

* iOS: a space tapped as the letter above the space bar splits the words

X (Erick): "Auto correct does not separate two words like apple does
(consistently)." Spatial autocorrect read a letter tap as a missed space only
when it landed below the bottom row's centre line, so "ofbthe", "uscto" or
"oncthe" with the c, v, b or n hit on its upper half stayed one word. The system
keyboard turns "of" + b + "the" into "of the" wherever on the b the tap lands,
its centre included (black-box, iOS 27.2 simulator).

The decoder now knows where the space bar is (TypingDecoder.Keys.space, both
bars as on the unsplit keyboard), and a tap on the bottom row's upper half above
the bar may be a space, priced by the bar's Gaussian likelihood against the
row's (spaceTapCost 5 + spaceTapWeight 0.25 x the difference, in nats). There
both halves must be exactly the letters typed, so an unknown name's middle
letter is never a space with slips around it ("rima" stayed "rima"; without
that rule it became "to a"). Taps below the centre line keep the old reading and
cost. Spanish keeps only the old reading: its one- and two-letter words made
these splits too cheap ("vaxes" -> "va es") and they fixed nothing there. A
missed space after English "i" ("iwant") now gives "I want", as "i" alone does.

Tuned on the dev and targeted sets (held-out sets checked only after).
Verified: AutocorrectEngineTests.testASpaceTappedAsALetterAboveTheSpaceBarOr
MissedSplitsTheWords plus AutocorrectEngineTests, FullKeyboardEngineTests,
KeyboardLayoutTests and SwipeDecoderTests pass (165 tests, iOS 27.2 simulator).
Benchmark: EN held-out WER 5.48% -> 5.47% (correct words broken 79 -> 79); ES
unchanged (8.61%, 23); 300 sentences with a merged pair 9.73% -> 7.40%; engine
p95 per letter tap 1.9 ms.

* iOS: a space tapped at the space bar's edge for a letter joins the words

X (Justin): "Space bar accidental taps or lack of taps don't seem to be factored
in." A letter tap that landed on the space bar typed a space, and nothing ever
joined the two halves ("deli ate", "num er"). The system keyboard (black-box,
iOS 27.2 simulator) merges them at the next word's space when the space tap was
near the bar's top edge ("deli" + space + "ate" -> "Delicate", "a out" ->
"About", "so gs" -> "Songs"), and not when it was well inside the bar.

The engine now remembers the finished word's taps and where its space was
tapped. At the next word's space or closing mark, TypingDecoder.merge reads the
first word's taps, the space tap as a letter on the row above and the second
word's taps as one word; it replaces the two words when it beats them by the
usual margins (7 nats when both are words, 2 otherwise) and the tap was within
mergeReach (3 nats: the row at most that much less likely than the bar under
the space bar's Gaussian, about its top fifth, a little deeper than the system
keyboard). One backspace right after puts back both words and keeps the second.
A merged or split word is remembered as it reads, without taps. Words you kept,
learned words, shorthand, Contacts names and apostrophes are never joined. The
space tap's place now reaches typeSpace (as on the unsplit keyboard).

mergeReach was tuned on the dev and targeted sets (held-out checked after).
Verified: AutocorrectEngineTests.testASpaceTappedAtTheSpaceBarsEdgeForALetter
JoinsTheWords plus AutocorrectEngineTests and FullKeyboardEngineTests pass (120
tests, iOS 27.2 simulator). Benchmark: EN held-out WER 5.47% -> 5.23%, ES 8.61%
-> 8.34%, correct words broken 79 -> 79 and 23 -> 23; 200 sentences with a
letter tapped on the space bar 29.57% -> 16.04%; engine p95 1.9 ms per letter,
0.06 ms per space.

* iOS: no stray capitals from swiped words

X (Eric Jung): "the swipe keyboard has random auto capitalization of words."
Reproduced by swiping 600 held-out sentences word by word through the engine
with the swipe benchmark's finger models. Shift and auto-capitalization around a
swipe were right in every sequence tried (after a period, comma, return, delete,
a strip pick, a host text-change, one-shot shift and caps lock); the capitals
came from the readings themselves:

- The typing model's lowercase word list holds names and abbreviations ("gs",
  "ut", "om", "kent"), which the dictionary knows only capitalised, so a loose
  swipe of "he" or "it" went in as "Gs" or "Ut" mid-sentence. Such a reading now
  costs 4 nats more unless it is common (the model's ~2,500 commonest words:
  "york", "english") or one of your own words (Contacts names keep theirs).
  The check is shared with the casing (FullKeyboardEngine.swipeReadsAsName) and
  applied after decoding, on the main thread, for the swipe and its preview.
- "I'm", "I'd" and "I've" had one fixed cost whatever came before ("with us I'm
  Boston"). A contraction is now as much likelier after the word before as its
  first word is (SwipeDecoder.ExtraWords.heads, "i" for "I'm", "do" for
  "don't"), 3 nats more when the model never has that pair.

Verified: FullKeyboardEngineTests.testASwipeMidSentenceGetsNoStrayCapital plus
AutocorrectEngineTests, FullKeyboardEngineTests and SwipeDecoderTests pass (128
tests, iOS 27.2 simulator). Swipe probe (600 held-out sentences, 3,986 words):
typical fingers words right 3,569 -> 3,578, stray mid-sentence capitals 1 -> 2
(one "I'd" for "if"), contractions right 171 -> 180 of 216; sloppy fingers
2,873 -> 2,888, stray capitals 18 -> 6, contractions 137 -> 145.

* iOS: a space at the bar's edge joins words only when space wouldn't fix them alone

Follow-up to "a space tapped at the space bar's edge for a letter joins the
words" (a005d926). The merge weighed one word against the two words exactly as
typed, so a second half with a slip counted as an unknown word and lost:
"i" + edge space + "dkdnt" became "Obedient", where space turns "dkdnt" into
"didn't" on its own. The two words are now scored as space would leave them:
each as typed or its likeliest reading of its own taps, the second after the
first's.

Verified: AutocorrectEngineTests (testASpaceTappedAtTheSpaceBarsEdgeForALetter
JoinsTheWords now also types "i" + edge space + "didnt" -> "I didn't") and
FullKeyboardEngineTests pass (121 tests, iOS 27.2 simulator). Benchmark: the
broken word on the homophone set is back (correct words broken 4 -> 3); EN
held-out WER 5.23% -> 5.24% (726 -> 727 edits, broken 79), ES unchanged (8.34%,
23), letter-on-space-bar set 16.04% -> 16.38%; engine p95 1.8 ms per letter.

* iOS: a closing mark from the 123 page reads the word's taps

Follow-up to "punctuation after a word fixes its typo, as space does"
(fb6200df). Found in a live check in Messages: "ofthe." became "Oft he." where
space gives "of the" (and the system keyboard "Of the."). Tapping 123 rebuilds
the layout, and off the letters page TypingDecoder.Keys(layout:) is nil, so by
the time the mark finished the word Spatial autocorrect had no keys and the
dictionary's guess was used. The letters page's keys now stay while another page
shows; they are where the word was typed.

Verified: AutocorrectEngineTests (the split test now also types "ofthe" + 123
+ "." -> "of the.") and FullKeyboardEngineTests pass (121 tests, iOS 27.2
simulator). Benchmark: the 300-sentence punctuation set 6.83% -> 3.94% WER,
sentences exactly right 179 -> 230; held-out sets unchanged (EN 5.24%, ES
8.34%; broken 79, 23).

* iOS tests: the space-bar merge test types with the next-letter odds on

testASpaceTappedAtTheSpaceBarsEdgeForALetterJoinsTheWords ran without the
typing model's next-letter odds, which the keyboard always has, and there "a" +
edge space + "out" joined into "about"; with them, as in a live check in
Messages, the two words stay (the 7-nat margin for joining two real words). The
test now sets letterOdds and types "ha" + edge space + "ded" -> "handed", which
joins both ways and on the system keyboard. No code change.

Verified: AutocorrectEngineTests and FullKeyboardEngineTests pass (121 tests,
iOS 27.2 simulator).
2026-11-21 05:24:20 +00:00
.cargo Add KB-Whisper Medium for Swedish (#1991) (#1992) 2026-11-19 05:44:56 -05:00
.cloudflare/cache ci(aur): a dispatchable check that the AUR accepts the deploy key 2026-10-23 14:41:55 -04:00
.config feat(onboarding): the first run is one story, from a bad conversation to your first words (#1501) 2026-11-09 17:29:51 -08:00
.github Set up Hex Mobile internal TestFlight releases (#1997) 2026-11-19 11:48:49 -05:00
android Bump Hex Android to 0.1.1 (build 2) for internal testing (#2082) 2026-11-20 18:09:21 +00:00
app Keep the old Sparkle key so 2.3.1 and Swift Hex can update into the new Hex (t1217) (#1092) 2026-11-02 21:44:19 -08:00
assets Show Jay's photo in onboarding (#1630) 2026-11-10 13:41:20 -08:00
crates annotate: record the screen under the pointer on wayland (labs), list hex annotate without a shortcuts portal (#2094) 2026-11-20 15:58:16 -05:00
design Captures: the Scrawl capsule and ink overlay on Rune 2026-10-26 10:48:55 -07:00
docs Linux: join back-to-back dictations on Wayland (#2138) 2026-11-20 23:04:46 -05:00
ios iOS: autocorrect splits merged words, fixes missing apostrophes and homophones, and corrects before punctuation (#2144) 2026-11-21 05:24:20 +00:00
macos/HexMicrophoneDriver feat(macos): the app is anomaly.hex, a new app to macOS, from the first Anomaly-signed release 2026-10-23 14:57:13 -04:00
native macOS: close the Screen Recording guide once Hex reads the grant (#2086) 2026-11-20 14:50:03 -05:00
nix fix: drop parakeet's padding mel frame before the encoder (#2072) (#2076) 2026-11-20 13:01:29 -05:00
packaging windows: sign the setup engine so smart app control can run setup (#1987) 2026-11-19 02:38:03 -05:00
perf perf: listening bench waits for the listener before measuring rest (#1615) 2026-11-09 16:19:11 -06:00
prototypes/app-shell Rename voice-control to hex everywhere, without migrations (#293) 2026-10-28 13:08:44 -04:00
release-notes feat: add local transcription service and resilient capture 2026-07-21 14:22:12 -04:00
resources linux: recolor the tray mark with the panel's text color (#1691) 2026-11-11 10:46:08 -05:00
scripts iOS: split DictationController so dev passes the size check (#2066) 2026-11-20 11:42:45 -05:00
sdk add fluid speech pro to the speech model catalog (#2007) 2026-11-19 15:19:06 -05:00
site site: /hex/ios redirects to Hex for iPhone on the App Store (#2122) 2026-11-21 00:59:44 +00:00
skills/hex-personal-commands docs: rewrite README minimal, shorten CONTRIBUTING 2026-11-01 12:44:35 -05:00
src Linux: join back-to-back dictations on Wayland (#2138) 2026-11-20 23:04:46 -05:00
tests vocabulary: import and export csv files (labs) (#2117) 2026-11-20 19:37:20 -05:00
.gitignore iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
.hivemind.toml feat(land): add declarative .hivemind.toml land queue + Hex.app swap (t811) (#387) 2026-10-29 09:52:47 -07:00
.markdownlint-cli2.jsonc feat: unify desktop modes and platform runtime 2026-07-23 17:33:22 -04:00
AGENTS.md vocabulary: import and export csv files (labs) (#2117) 2026-11-20 19:37:20 -05:00
build.rs feat(onboarding): the first run is one story, from a bad conversation to your first words (#1501) 2026-11-09 17:29:51 -08:00
Cargo.lock fix: drop parakeet's padding mel frame before the encoder (#2072) (#2076) 2026-11-20 13:01:29 -05:00
Cargo.toml fix: drop parakeet's padding mel frame before the encoder (#2072) (#2076) 2026-11-20 13:01:29 -05:00
clippy.toml Add agent marker and drop internal references (#702) 2026-10-31 18:30:32 -07:00
CONTRIBUTING.md docs: rewrite README minimal, shorten CONTRIBUTING 2026-11-01 12:44:35 -05:00
flake.lock feat(linux): add wlroots Wayland support and Nix packaging (#36) 2026-08-28 12:05:21 -04:00
flake.nix nix: build for aarch64-linux (#1057) 2026-11-02 14:11:35 -05:00
LICENSE feat: unify desktop modes and platform runtime 2026-07-23 17:33:22 -04:00
README.md Add KB-Whisper Medium for Swedish (#1991) (#1992) 2026-11-19 05:44:56 -05:00
ROADMAP.md Roadmap: Hex Mobile spoken-language detection and translating copied text (#2137) 2026-11-21 03:40:38 +00:00
SECURITY.md Rename voice-control to hex everywhere, without migrations (#293) 2026-10-28 13:08:44 -04:00
strobe.json perf: listening bench waits for the listener before measuring rest (#1615) 2026-11-09 16:19:11 -06:00
THIRD_PARTY_NOTICES.md add fluid speech pro to the speech model catalog (#2007) 2026-11-19 15:19:06 -05:00

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:

Hex output: the steps every dictation runs, a Try box, and different steps per app Hex history: past dictations, a search field, and one entry's raw transcript, app, processing and model

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.