hex/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 5abf59f9fe Android: dictation keeps the model loaded, sizes the encoder to short speech, threads on fast cores
Hex's dictation spent 80-93% of its wait in Whisper's encoder on a fixed window
and loaded and freed the 190 MB model for every dictation. Now:
- the model loads when the Hex key goes down (while the person speaks), stays
  loaded between dictations (keyboard and Home share it), and is freed 2
  minutes after the last one or on onTrimMemory; nothing runs while it waits;
- up to 8 s of speech, the encoder window is the speech plus 3.84 s, capped at
  the previous 512 frames; longer clips and the bundled tiny model keep the
  full window (every shorter one tried cost them accuracy; tiny repeats itself);
- one thread per fast core (cpu_capacity at least half the strongest), at most
  four, so a 2+6 phone no longer waits on its slow cores.
Replaced: per-dictation load/free inside Whisper.decode (now load/free/decode
JNI calls owned by SpeechModel) and the fixed 512 window for <= 8 s.

Verified: emulator timing harness on the 40-clip benchmark, median 0.76 s ->
0.56 s at the same WER 5.26%; 15 long clips 5.69% unchanged. testDebugUnitTest,
assembleDebug and lintVitalAnalyzeRelease pass; on the emulator the model
loaded on key-down, was reused, and was freed after 2 minutes (509 -> 251 MB,
0% CPU idle). Not run: an app-path decode (no audio input on the Studio).
2026-11-23 14:23:18 -05:00
..
src Android: dictation keeps the model loaded, sizes the encoder to short speech, threads on fast cores 2026-11-23 14:23:18 -05:00
build.gradle.kts Android: Hex Preview, an APK outside Google Play that updates itself (#2531) 2026-11-23 11:37:51 -05:00
proguard-rules.pro Hex for Android: on-device dictation keyboard (#2074) 2026-11-20 17:27:17 +00:00