Skip to content

Voice input: optional speed display, name of the imported model, thread labels as measured - #1002

Open
4di-hello wants to merge 9 commits into
LeanBitLab:mainfrom
4di-hello:pr/voice-speed-display
Open

4di-hello wants to merge 9 commits into
LeanBitLab:mainfrom
4di-hello:pr/voice-speed-display

Conversation

@4di-hello

@4di-hello 4di-hello commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Goes with the voice plugin PR LeanBitLab/LeanType-Voice-Plugin#6 (recognition 3–4× faster).

What changes

  • "Show speed" (Voice input → Performance, default off): after each offline dictation a toast with the model and threads, recording time, how long the keyboard waited for silence after the last word, recognition time after the recording, the total from the last word until the text is there, and how many parts were already recognized while speaking (with "Transcribe while speaking", only if more than one). Only numbers, no text.
  • Which model is in use: imported Whisper models all have the same name in the plugin, so the app couldn't show which one was active. The keyboard now keeps the file name of the import and shows it in "Manage models", in the model dialog ("Imported & ready: ") and in the speed display. A model imported before this shows "Own model (import it again to show its name)". The file name comes from whatever app provides the file, so it is stored as plain display text: control, line separator and text direction characters are removed, at most 80 characters.
  • Thread labels: "4 threads (recommended: the fast cores)", "6 threads", "8 threads (all cores, usually slower)". With the plugin PR the threads run on the fastest cores, and 8 threads were slower than 4 (numbers in the plugin PR). Only English and German are updated; the other languages still have the old labels.
  • Recommendation in the model dialog under "FUTO Voice Models (ACFT)": in our tests the fastest and most accurate for German (Multilingual-244: text 1.5 s after the last word).
  • Strings in English and German.

How we tested

Same phone and dictations as in the plugin PR. The speed display was built first: it showed that the wait after speaking was almost only recognition (7.4 s for a single sentence) and not waiting for silence (0.3 s), which pointed to the 30 s window in the plugin. All numbers in the plugin PR come from this display. While testing models it also showed that a supposed "Turbo" test had actually run with Small, which is why the model name is shown now.

It was a lot of testing, but I think the effort was worth it: with the display every change could be measured instead of guessed.

Added on 30.11.

  • Import confirmation: after importing a model the keyboard waits for the plugin's result and shows "Model ready: (file name)" or why not ("not a Whisper model file", "the model could not be loaded", "the voice plugin stopped during the import"). The service stays bound until then, also when the settings screen is left. Before, the keyboard unbound after 30 s, and Android could end the plugin in the middle of a large import. With plugins that don't report the import result (all current releases), it behaves as before. A plugin that refuses the keyboard is reported as not connected.
  • After the processing timeout the keyboard also cancels the plugin's session, so it doesn't hold up the next dictation (needs the cancel fix in Plugin 1.1.0: recognition 3–4× faster (window fitting the recording, one thread pool, CPU variants), no dictated text in the log LeanType-Voice-Plugin#6 to stop the computation).
  • The FUTO recommendation now says "fastest" only: in later tests whisper-large-v3-turbo-german (q8_0) was more accurate, but about 1.5 times slower.
  • Tested on the phone: broken download → "the model could not be loaded" (the previous model stayed), FUTO and Turbo → "Model ready".

All work and measurements were done with Claude Code; I tested every version on the phone.

🤖 Generated with Claude Code

4di-hello and others added 9 commits November 29, 2026 14:41
Optional (off by default) in the voice settings: recording time, how long it
waited for silence after the last word, recognition time after the recording,
when the text was there after the last word, and how many parts were already
recognized while speaking. Journal: key findings on top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plugin stores every Whisper model under the same name, so an imported model
was only "custom". The file name of the import is now kept and shown in the voice
settings (models entry), in the model dialog and in the speed display. Listed
models show their name. Journal: voice plugin measurements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…without name

The settings showed nothing for a model imported before its file name was stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…odels recommended

8 threads are usually slower than 4 on the fast cores: every computation step waits for the slowest core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o for cloud recognition, standard toast

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It comes from whatever app provides the file: no control or direction characters, at most 80 characters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…el dialog

Only control characters, line/paragraph separators and direction controls are removed (joiners
stay), cut between whole characters; the model dialog showed the stored name unfiltered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s the plugin's recognition

- Importing a model shows whether the plugin really has it ready, or why not (not a Whisper file, could
  not be loaded, plugin stopped during the import); the binding is kept until then, so Android does not
  end the plugin in the middle of a large import. Older plugins: as before
- After the processing timeout the plugin's recognition is cancelled, so it does not hold up the next one
- FUTO recommendation says fastest only: a larger model was more accurate in later tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…calls and queued imports handled

- unbind() while an import waits for its result is deferred until the import has ended: leaving the
  screen or pressing Home no longer ends the wait with a wrong "plugin stopped" and no longer drops
  the binding in the middle of the import
- A plugin that refuses the keyboard (SecurityException) is reported as not connected instead of being
  taken for an older plugin
- If another import is still running in the plugin, the result of the one after it is awaited
- Import note parsed more tolerantly; "Model ready" never shows an empty name

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant