hex/android/app/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 8aa432fe43 Android: a fresh decoding state for every dictation
Since #2566 keeps the speech model loaded between dictations, every decode
reused one whisper_state. A short dictation sizes the encoder window to its
speech (<= 512 frames), but the state still held the encoder output of an
earlier, longer dictation past that window's end, and cross-attention read
it. So a short dictation after one over 8 s could come out differently, even
in another language. Each decode now creates its own whisper_state (about
3 ms on the emulator) and frees it after; the weights stay loaded.

Verified:
- Harness on the emulator (app's whisper.cpp, small, 4 threads, the app's
  window rule, identical PCM): 40 benchmark clips each in its own language,
  after a long English clip. Shared state: 7 of 40 texts changed after
  enl0, more after enm3 (e.g. "Vi møtes på station imon" -> "Vi møtes posta
  shown imon"). Fresh state: 0 of 80 changed against a fresh process; mean
  517 ms against 512 ms.
- In the app (debug, dictation language Norsk, mic injection): before,
  all 5 Norwegian clips changed after one long English dictation ("Vi
  møtes posta show lemon"); after, the after-long texts match the fresh
  ones within the injection's run-to-run noise.
- testDebugUnitTest passes.
2026-11-23 16:44:50 -05:00
..
main Android: a fresh decoding state for every dictation 2026-11-23 16:44:50 -05:00
play/java/ly/anoma/hex/updates Android: Hex Preview, an APK outside Google Play that updates itself (#2531) 2026-11-23 11:37:51 -05:00
preview Android: Send feedback form that posts to Bellhop (#2582) 2026-11-23 15:51:14 -05:00
release Hex for Android: on-device dictation keyboard (#2074) 2026-11-20 17:27:17 +00:00
test/java/ly/anoma/hex Android: Send feedback form that posts to Bellhop (#2582) 2026-11-23 15:51:14 -05:00