hex/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel e65fa327ee Android: Diagnostics' Last dictation says which dictation ran, and why it fell back
What: the Last dictation lines (#2733) now hold for Faster English dictation too.
- They name the model that wrote the text in plain words: "standard dictation" or "faster English dictation". For a
  fallback they say why: the download missing or failing its check, the phone low on memory, the model not loading,
  or the faster model failing (its try is then in the decode's time).
- A faster dictation gives its thread count and no encoder/decoder/prompt split, which its library doesn't report.
  Wall and processor time are measured from the first model call, after any load, as before.
- The speed test's faster runs add their thread count; they already had processor time, the cores they ran on
  and their clocks.

How:
- SpeechRouting: EnglishResult.Unavailable carries an Unready reason (NoFile, LowMemory, LoadFailed) instead of a
  Boolean. Decoded carries RanOn instead of lowMemory, which is now derived from it, so the low-memory note is
  unchanged.
- SpeechModel.Spent and DictationTimes gain ran and threads, defaulted so the existing callers are unchanged.
- During the rebase onto #2733, prepare() gained the Boolean: it counts loads of either model, so it says whether
  the model this dictation needs was read. The decode's start is stamped at its first model call, and whisper.cpp's
  timings are copied only when today's model decoded.

Removed behaviour: none. EnglishResult.Unavailable(memory) and Decoded(lowMemory) are replaced as above.

Verified on basebook (JDK 21): assembleDebug, assemblePreview and testDebugUnitTest pass, 234 tests and 0 failures.
- New cases: a failed load says so (FastEnglishRoutingTest); the Last dictation line for a faster dictation and for a
  low-memory fallback; a faster speed test run's threads and clocks (StripTextTest).
- The existing Last dictation cases now read "standard dictation".
- Not run on the emulator: the Studio is held for timing.
2026-11-24 13:11:33 -05:00
..
src Android: Diagnostics' Last dictation says which dictation ran, and why it fell back 2026-11-24 13:11:33 -05:00
build.gradle.kts Android: a second speech library for faster English dictation, not yet reachable 2026-11-24 13:07:19 -05:00
proguard-rules.pro Android: keep Parakeet's JNI methods through R8, and debug-only ways to watch the faster model 2026-11-24 13:09:19 -05:00