Skip to content

example: download progress on model-install screens + device-local LLM staging for the voice gate - #403

Merged
DenisovAV merged 2 commits into
mainfrom
feat/example-download-progress
Aug 3, 2026
Merged

example: download progress on model-install screens + device-local LLM staging for the voice gate#403
DenisovAV merged 2 commits into
mainfrom
feat/example-download-progress

Conversation

@DenisovAV

Copy link
Copy Markdown
Owner

What

1. Determinate download progress on every model-install screen.
These screens installed a model with an indeterminate spinner, so a slow (or stalled) download was indistinguishable from a hang. Surfaced while testing the voice loop on a physical iPhone: the Matcha TTS bundle (8 files, ~94 MB) crawls under iOS background URLSession, and with no progress the screen looked frozen. Each screen now wires the existing install-builder progress callbacks into a determinate indicator (falls back to indeterminate during the post-download graph-compile phase):

  • tts_screen, stt_screen, voice_screen — speech screens (voice_screen also labels the three sequential stages: speech / voice / language model)
  • translate_screen, chat_screen — feed the existing LoadingWidget(progress:)
  • embedding_test_screen, cosine_similarity_screen — additive progress card

Uses the builders' real callbacks: installModel().withProgress (byte-level), installTts().withProgress (per-file across the bundle), installStt()/installEmbedder().withModelProgress + .withTokenizerProgress.

2. voice_loop_test: token-free device staging.
The gate installs the LLM from a device-local file (no HF token) on Android (Firebase Test Lab --other-files) and iOS (devicectl-pushed), matching the desktop staged-model convention — so it runs token-free on every platform.

Notes

  • Example-app + integration-test only; no package/library code changed.
  • flutter analyze clean (no new issues).

…al LLM staging for the voice gate

Model-install screens showed an indeterminate spinner during download, so a
slow (or stalled) install was indistinguishable from a hang — surfaced while
testing the voice loop on an iPhone, where the Matcha TTS bundle downloads
slowly under iOS background URLSession. Wire the existing install-builder
progress callbacks into a determinate indicator across all seven screens that
installed without progress:

- tts_screen, stt_screen, voice_screen (voice_screen also labels the 3 stages)
- translate_screen, chat_screen (feed the existing LoadingWidget.progress)
- embedding_test_screen, cosine_similarity_screen (additive progress card)

voice_loop_test: install the LLM from a device-local file (no HF token) on
Android (Firebase Test Lab --other-files) and iOS (devicectl-pushed), matching
the desktop staged-model convention, so the gate runs token-free everywhere.
@DenisovAV
DenisovAV force-pushed the feat/example-download-progress branch from d86f0cd to 02f7b94 Compare August 3, 2026 12:14
- chat_screen: render the error instead of a frozen percentage when init
  fails (the error banner lived in the initialized branch and was
  unreachable), and clear the percent in the catch.
- embedding_test_screen: surface install failures instead of swallowing
  them, clear the percent, and hide the progress card when an error is set.
- cosine_similarity_screen: clear the percent on failure so the progress
  card no longer contradicts the error card beside it.
- loading_widget: drive a determinate indicator from progress, so the
  screens that route through it get a real ring, not a bare percentage.
- stt / embedding / cosine: label the phase, since the model and the
  tokenizer download sequentially into one counter and the bar otherwise
  runs 0-100-0 while claiming 'model' throughout.
- voice_loop_test: accept HUGGINGFACE_TOKEN as well as HF_TOKEN, and fail
  loudly when neither a staged model nor a token is available instead of
  silently taking the gated network path.
@DenisovAV
DenisovAV merged commit 33d762a into main Aug 3, 2026
5 checks passed
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