feat(mobile): add Android system TTS fallback - #3297
Closed
johnmatthewtennant wants to merge 20 commits into
Closed
Conversation
johnmatthewtennant
force-pushed
the
jtennant/mobile-pocket-tts
branch
from
July 28, 2026 13:17
199f931 to
c0e3080
Compare
johnmatthewtennant
force-pushed
the
jtennant/mobile-android-system-tts-fallback
branch
from
July 28, 2026 13:54
335d754 to
535fa1a
Compare
johnmatthewtennant
force-pushed
the
jtennant/mobile-pocket-tts
branch
from
July 28, 2026 14:03
c0e3080 to
e4ec043
Compare
johnmatthewtennant
force-pushed
the
jtennant/mobile-android-system-tts-fallback
branch
from
July 28, 2026 14:07
535fa1a to
46349bc
Compare
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
johnmatthewtennant
force-pushed
the
jtennant/mobile-pocket-tts
branch
from
July 28, 2026 14:38
e4ec043 to
4691cad
Compare
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
johnmatthewtennant
force-pushed
the
jtennant/mobile-android-system-tts-fallback
branch
from
July 28, 2026 14:44
46349bc to
d490d4f
Compare
johnmatthewtennant
force-pushed
the
jtennant/mobile-pocket-tts
branch
from
July 28, 2026 20:06
4691cad to
6b1e6f1
Compare
Contributor
Author
|
🤖 Closing for now: Pocket TTS is the sole active voice backend, so the Android system TTS fallback is no longer in scope. The branch is preserved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Pocket remains the preferred on-device voice backend, but voice currently becomes unavailable when its model is absent, cannot load, synthesis fails, or Android asks the app to release memory.
This PR is stacked on #3290 at exact head
4691cad0c0afa153c7a4ce4d2333340e26b3d9c2(itself on #3303 atd9193add61f4246d0ebb408fbf64470c72aacd88).Summary
Adds an Android-only fallback to the installed default
TextToSpeechengine while preserving one ordered Dart-owned speech queue. Pocket is selected whenever it is ready; successful fallback is silent in the UI, while backend and fallback reason remain visible in controller state for diagnostics.Changes
startedonly after a backend-and-generation-matched playback start.Related issue
No duplicate Android issue or PR found. The closest related work is the iOS-only system voice fallback in #3296.
Testing
just cijust mobile-checkjust mobile-test— 857 tests passedflutter test test/shared/voice/pocket_voice_controller_test.dart— 18 focused tests passedSystemTtsCallbackFenceTestBuzzAndroidTTS-019fa858:installedDefaultEngineInitializesWithItsDefaultLanguagepassedvoiceBoundarySpeaksAndCancelsWithGenerationFencedCallbackspassedThe prior Mobile CI failure was from the old stack lacking the
aarch64-linux-androidRust target; #3290's current head installs the Android Rust targets before this child builds.Manual audio gate: the headless emulator verified the real engine's completion callback and cancellation fence, but audible host output was not human-confirmed. On an Android device, leave Pocket unavailable, start voice, verify an assistant reply is audible through the system-default voice, then stop during a second reply and confirm it does not resume.
Screenshots
N/A — audio backend and lifecycle behavior; no visual UI change.
Reviewer-reproducible examples
SystemTextToSpeechInstrumentedTestfrom Android Studio on a named disposable Android 15 AVD.