Repository navigation
Conversation
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 provides an alternative implementation of the Speak numbers as digits feature proposed in #439 and discussed in #418. It is not intended to be merged alongside #439.
Following Quin's suggestion to investigate Android's
TtsSpan.DigitsBuilder, I explored native speech pronunciation metadata as a way to avoid modifying the speech text.Implementation
TtsSpan.DigitsBuilderto request digit-by-digit pronunciation for consecutive runs of 2–32 digits, including leading zeros.Testing
TtsSpanapproach using Google Speech Services on a physical Android device, including the change from a whole-number reading of283482to individual-digit pronunciation when enabled.Compatibility and trade-offs
This version depends on the chosen TTS engine interpreting Android's
TYPE_DIGITSmetadata. The implementation in #439 instead inserts spaces in a speech-only representation and has demonstrated compatibility with Vocalizer Tessa, at the cost of additional offset and speech-state handling.I lean toward the native Android API approach because it leaves the original speech text unchanged and avoids custom offset mapping. However, I recognise the broader observed compatibility of #439.
These are alternatives, not cumulative changes. I'd welcome Quin's guidance on which implementation better fits BackTalk's architecture, compatibility goals and long-term maintenance.