mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-27 07:58:01 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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). |
||
| .. | ||
| src | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||