Skip to content

Debug build 7e1cca5 — fix(#1868): Piper voice selection, sample, size

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 14 Nov 23:21
· 1 commit to main since this release
7e1cca5

PR #1906: fix(#1868): Piper voice selection, sample, size

Closes #1868

Summary

Voice output settings: Piper (Sherpa) voice setup, Cori download state, and the Inflect Micro row, which shares the Cori frontend pack.

Risk tier

Medium. Changes voice-output engine selection, download start/cancel, and the Voice settings state machine. No inference-path, model-loading, or on-device LiteRT change.

Behaviour

  • Who owns the shared Cori pack. While Piper is the selected output, the Piper row owns Cori. Inflect shows only its own graphs and its Cancel never touches Cori. While Piper is not selected, Inflect owns Cori only when its own graphs have started, a graph failed, or all graphs are downloaded and Cori is downloading. In that case the Inflect row shows Cori progress and its Cancel stops the Cori download.
  • Derived, not remembered. Inflect's state is computed from the current download states; there is no in-memory flag, so recreating the ViewModel does not change it. A process restart does not change it either.
  • Progress. Inflect's progress counts Cori bytes only while Inflect owns the pack. A downloaded Cori pack that Piper owns does not stall the Inflect bar.
  • Cancel. The Inflect row and the status line under the output choice show one Cancel for a Cori download; the status line hides its Cancel while the Inflect row is preparing.
  • Piper status. A selected Piper is "Active" only when its voice is downloaded. Otherwise it shows "Setting up" while Cori downloads, or "Needs ". The selection card says Android TTS speaks until the voice is ready.
  • Engine switch. Choosing an engine refreshes Inflect availability. Re-tapping the current engine does not call onEngineChosen.
  • Mobile data. Per-pack mobile-data allowance is set only after the release-visibility guard passes. It is cleared on FAILED, cancel, delete, and success, not on CANCELLED (WorkManager emits it during REPLACE). It is in memory and lost on process restart.
  • First-run defaults. The updated-install check (isExistingInstall) is captured before the download-network consent wait. The stored-engine check is read after the wait, so an engine picked in Settings during the wait is not overwritten. Downloads still wait for consent.

Known limits / risks

  • waitingForWifi is sampled on WorkManager emissions, so a network change can take one emission to show.
  • Kokoro startKokoroDownload still uses the global network choice; out of scope for #1868.
  • Inflect release visibility is unchanged.
  • The per-pack mobile-data allowance does not survive a process restart.

Evidence

  • Device, S23U (RFCW11265XH), debug build at 9265ecab: docs/evidence/1868/07-s23u-cori-ready-9265ecab.png. It shows Cori first in the voice list, Cori Ready and selected, with Play sample. The Piper status line is not in this frame.
  • Cori was already installed on the phone, so the downloading, Piper-owned, and Inflect-isolation states were not captured on device. They are covered by unit tests in VoicePackAvailabilityMappingTest:
    • Cori downloading belongs to the Piper row while Piper is selected
    • Cori downloading alone is not Inflect progress while Piper is not selected
    • Piper-owned downloaded Cori does not stall Inflect graph progress
    • downloaded Inflect graphs show Cori progress while Piper is not selected
  • No unit test covers the "Waiting for Wi-Fi" status line. It is unverified.
  • Older screenshots under docs/evidence/1868/ were removed as stale.

Validation

  • Unit tests and lint for :core:voice, :feature:settings, and :core:inference, plus lintDebug, run in the foreground for this commit (see the commit message for the head SHA).

Do not merge — wait for review.


Commit: 7e1cca5c6ad2a01a0c3e9f7213b13a41916ef08a
Build: #4158