feat(notifications): add Text-to-Speech (TTS) read aloud feature for incoming messages - #12
Open
ralexandrec wants to merge 1 commit into
Open
ralexandrec wants to merge 1 commit into
ralexandrec wants to merge 1 commit into
Conversation
ralexandrec
force-pushed
the
feature/read-aloud-tts
branch
from
September 1, 2026 23:12
2c67f51 to
2e9980b
Compare
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.
Summary
This PR introduces an optional Text-to-Speech (TTS) read-aloud feature for incoming mesh messages, designed to provide eyes-free / hands-free audio announcements on Wear OS smartwatches.
Key Highlights & Architecture
Text-to-Speech Integration (
Notifier.kt):TextToSpeech.OnInitListenerinsideNotifierto synthesize incoming chat messages ("$senderName: ${message.text}").AudioAttributes(USAGE_ASSISTANT,CONTENT_TYPE_SPEECH) for proper Wear OS audio routing to speakers or Bluetooth headsets.Power & Screen-Off Execution (
Notifier.kt):PARTIAL_WAKE_LOCK(5s) upon message arrival to prevent CPU sleep during speech synthesis, allowing incoming messages to be announced even when the display is off.User Control & Persistence (
Prefs.kt,SettingsScreen.kt):read_notifications_ttspreference inPrefs(backed bySharedPreferencesandStateFlow).SwitchButtonunder the Messaging subheader inSettingsScreentitled "Read aloud (TTS)" with clear status subtitles.true) for immediate out-of-the-box functionality.Locale Formatting Fix in Unit Tests (
MeshModels.kt):Locale.UStoString.formatinformatDistanceto ensure unit test consistency across non-US system locales (e.g. preventing,decimal separator issues inpt_BR).Verification
BUILD SUCCESSFUL).