mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-27 07:58:01 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* Android: Labs › Diagnostics reports the last dictation's step times
What: the diagnostics report gains a "Last dictation" section: where it
was made (keyboard or Home), seconds recorded and kept after the trim,
threads and encoder window, the model's state at ✓, the ms after ✓ at
which recording stopped, the decode started and finished and the text was
inserted, whisper.cpp's encoder / decoder / prompt split, and the
process's processor time against the decode's wall time. It is held in
memory only (a StateFlow, gone when the process ends): numbers, nothing
said or typed. The report says so in its heading line.
Why: two top-end phones (OnePlus 13, Poco X8 Pro Max) wait about as long
as the person spoke, while the harness and speed test predict ~2 s. The
speed test runs the same decode on a bundled clip, so it can't show what
a real dictation spends after ✓; this does, per step.
How: MicCapture stamps System.nanoTime at ✓, after the mic is released
and when the text is inserted, and keeps the sample counts it already
computes. SpeechModel.decode stamps its own start and end, the process
CPU time (Process.getElapsedCpuTime, -1 if unreadable) and copies
Whisper.timings() under its lock, into a Spent keyed by the job; the
speed test's measure() never writes it, so it can't overwrite a real
dictation's numbers. prepare() now returns whether it read the model, so
the report can say whether the model was loaded, loaded while speaking,
still loading at ✓ or loaded by the decode. MicCapture takes a
DictationPlace (Keyboard, Home) from its two callers.
The dictation path only gains plain timestamp and field writes that
can't throw; the decode's arguments, the audio, the trim and insertion
order are unchanged, and no native code changed.
Removed behaviour: none. Recognizer.prepare() returns Boolean instead of
Unit (LocalSpeech is its only implementation).
Verified on basebook: ./gradlew testDebugUnitTest assembleDebug
assemblePreview green under JDK 21 (196 tests). New cases in
StripTextTest: the report's lines (keyboard with timings and the model
still loading at ✓; Home stopped at 1 minute with nothing readable) and
the model-state rule; the existing report case now shows "none since Hex
started". Under the default JDK 17 two existing InsertionTest emoji cases
fail (JDK 17's BreakIterator lacks emoji clusters); they pass on 21 and
are unrelated. Not run on a phone or emulator (timing hold).
* Android diagnostics: the Last dictation heading says ✕ isn't counted
What: the report's Last dictation heading (and its 'none since Hex
started' form) now reads '…until Hex's process ends; a dictation
discarded with ✕ isn't counted; nothing said or typed'.
Why: the emulator run on
|
||
| .. | ||
| diagnostics/assets | ||
| main | ||
| play/java/ly/anoma/hex/updates | ||
| preview | ||
| release | ||
| test/java/ly/anoma/hex | ||