hex/ios/HEXMobileTests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 185585db73 iOS: custom vocabulary writes a name heard with another spelling the listed way
What changed
- New SoundAlikeSpelling (HEXShared, self-contained): after VocabularySpelling's
  exact match, in English only, a transcript word the engine capitalized takes a
  listed term's spelling when
  - it reads the same once interchangeable spellings are evened out (ph/f, hard
    c/k/ck, chr/kr, soft c/s, ae/e, a leading ai/a, a final y/ey/ie/ee/i, other
    y/i, a silent h, doubled letters): "Stacy" -> "Stacey", "John" -> "Jon",
    "Catherine's" -> "Katherine's", "Chris" -> "Kris", "Amy" -> "Aimee"; or
  - inside a sentence, and not right after another capitalized word, it sounds
    the same by a Metaphone-style key (consonants with voicing kept, first
    vowel sound, vowel ending, vowel groups) and is at most two edits away:
    "Jeff" -> "Geoff", "Versal" -> "Vercel".
  Terms qualify when they are one word of 3+ letters starting with a capital.
  Lowercase words, words in capitals, listed words and ties stay as heard.
- DictationPipeline runs it right after the exact rewrite, so the app and
  in-keyboard dictation, every engine and every style get it. One call site.
- README: the rule, and the measured fact that SpeechTranscriber ignores
  contextual strings.

Why
- TestFlight build 130: "I added the name 'Stacey' but it keeps coming back and
  says Stacy." Every engine writes a name's commonest spelling, and the exact
  rewrite only matches the same letters, so a list entry spelled another way was
  never written.

Measured (Mac Studio; 42 sentences with names and terms in Samantha, Reed and
Ryan's ElevenLabs clone; 132 listed-term occurrences, 90 of them names)
- Listed spelling written, raw / with today's exact rewrite / with this:
  Apple SpeechTranscriber 5 / 15 / 100; DictationTranscriber 4 / 13 / 97
  (28 / 31 / 107 with the list as hints); Parakeet V2 19 / 25 / 116.
  Names alone: 0-7 of 90 before, 83-87 of 90 after.
- Ordinary dictations (424 Apple and Parakeet transcripts from the numbers and
  multilingual experiments) with a 20-name-and-term list and a 40-term tech
  list: 0 words changed.
- 545,000 words of five Project Gutenberg novels: with the names list, 186 words
  changed, every one a name the list spells another way (Catherine -> Katherine
  118, John -> Jon 41, Rachel -> Rachael 7, ...; one place name, "St. John's
  Wood"). With the tech list, 3 words: "the Study in Scarlet" -> "Studio".
  3.2 s for the whole corpus, well under a millisecond per dictation.

Verified: python3 scripts/code-shape.py passes; xcodebuild test on an iPhone 17
Pro simulator (iOS 27.2) on the Mac Studio: 900 tests, 0 failures, 4 skipped,
including the new SoundAlikeSpellingTests. Not run on a physical iPhone.
2026-11-22 13:58:21 -05:00
..
Fixtures iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
AppleSpeechAssetReservationsTests.swift iOS: speech model preparation that never answers fails with Try again (#2372) 2026-11-22 12:31:22 -05:00
AutocorrectEngineTests.swift iOS keyboard: French reads Hex's own word list and capitals, not the phone's dictionary (#2404) 2026-11-22 13:34:40 -05:00
CleanupTaggerTests.swift iOS dictation: spoken numbers written in digits for every engine (Numbers as digits) (#2414) 2026-11-22 13:55:16 -05:00
CustomVocabularyTests.swift iOS: custom vocabulary writes a name heard with another spelling the listed way 2026-11-22 13:58:21 -05:00
DictationControllerTests.swift iOS keyboard: a long dictation goes to Apple's engine instead of Parakeet, which holds it all in memory (#2412) 2026-11-22 13:47:38 -05:00
DictationLanguageTests.swift iOS: dictate Latin American Spanish with Latin America's model, and keep a picked variant when the keyboard switches (#2193) 2026-11-21 09:53:34 -05:00
DictationLearningTests.swift iOS keyboard: Show what I say and Type as I speak (words while you dictate) (#2410) 2026-11-22 13:37:37 -05:00
DotScopeTests.swift fix(ios): eliminate handoff frame stalls and add overlapping ballistic swipe throw (t1153) (#757) 2026-10-31 22:14:22 -07:00
EmojiPanelLettersKeyTests.swift iOS dictation: no spaces or stray full stops around Chinese and Japanese; the bar's emoji panel says Back (#2347) 2026-11-22 03:47:53 -05:00
EmojiSuggesterTests.swift iOS keyboard: stop leaking views, capture web views, and emoji indices across shows (#2352) 2026-11-22 06:45:38 -05:00
FullKeyboardEngineTests.swift iOS keyboard: French reads Hex's own word list and capitals, not the phone's dictionary (#2404) 2026-11-22 13:34:40 -05:00
GreeklishRomanizerTests.swift iOS: add a Greeklish experiment for Greek dictation (#2366) 2026-11-22 08:51:48 -05:00
HangulComposerTests.swift iOS keyboard: Korean two-set (두벌식) layout with Hangul composition (experiment, off by default) (#2339) 2026-11-22 04:39:53 -05:00
HexKeyGestureTests.swift iOS keyboard: Paste alone takes a tap anywhere on the bar (#2386) 2026-11-22 11:36:18 -05:00
KeyboardBridgeTests.swift iOS: a warm session dictates in the background on iOS 27 again, and a keyboard that opens Hex brings the warm default back (#2406) 2026-11-22 13:12:24 -05:00
KeyboardDuoCoverTests.swift ios: smaller key labels on the duo's cover screen (#2346) 2026-11-22 04:35:44 -05:00
KeyboardLayoutTests.swift iOS keyboard: English and German together type on the first one's keys, as Apple's bilingual keyboard (#2402) 2026-11-22 12:55:14 -05:00
KeyboardSwitchGuessTests.swift iOS: the dictation bar can start dictating by itself (Auto-start: never, on switch, always) (#2267) 2026-11-21 17:08:50 -05:00
KeyboardThemeTests.swift iOS keyboard: add a keyboard themes experiment (#2365) 2026-11-22 08:24:11 -05:00
LaggingField.swift iOS keyboard: Korean two-set (두벌식) layout with Hangul composition (experiment, off by default) (#2339) 2026-11-22 04:39:53 -05:00
LanguageLearningTests.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
ShiftStateMachineTests.swift ios: add Dvorak punctuation keys experiment (#2373) 2026-11-22 09:31:25 -05:00
SwipeDecoderTests.swift iOS: swipe reads the letters under the path, and the emoji bar scrubs (#2189) 2026-11-21 08:47:45 -05:00
TranscriptCleanupTests.swift iOS dictation: spoken numbers written in digits for every engine (Numbers as digits) (#2414) 2026-11-22 13:55:16 -05:00
TwoLanguageMergeTests.swift iOS: two-language dictation experiment (#2348) 2026-11-22 04:58:27 -05:00
TwoThumbSelectionTests.swift iOS: two-thumb selection on the space bar (experiment, off by default) (#2265) 2026-11-21 20:44:15 -05:00
TypingGateReplayTests.swift iOS keyboard: French reads Hex's own word list and capitals, not the phone's dictionary (#2404) 2026-11-22 13:34:40 -05:00
TypingLogTests.swift iOS: hold the bar to dictate, Learn how I type on, a plain centred Paste, and typing logs off (#2210) 2026-11-21 12:11:58 -05:00
TypingReplayTests.swift iOS keyboard: the typing replay reports all-words accuracy, contractions and taps read as swipes (#2287) 2026-11-21 20:32:00 -05:00