In our Xumo Play application on Fire TV, we are implementing TTS for accessibility and need guidance on the correct approach.
What We Tested
We attempted multiple TTS implementations but none are working:
✗ window.speechSynthesis - Not available in Kepler
✗ window.vega.accessibility - Not found
✗ AccessibilityInfo.isScreenReaderEnabled() - Hangs/returns undefined
✗ AccessibilityInfo.announceForAccessibility() - No audio output
Our Questions
What is the recommended TTS approach for Kepler apps?
Is AccessibilityInfo working in the current Kepler version?
Can we use JavascriptInterface bridge to native Android TTS?
If any documentation or code examples are available, please share the details.
Text To Speech in Vega is called VoiceView and it’s the recommended approach for Vega Apps.
You can follow the documentation here and here to know more about VoiceView in Vega.
The AccessibilityInfo API provides functionalty that allows you to query the current state of the screen reader and to register to be notified when the state of the screen reader changes. The Vega SDK supports many of the React Native version 0.72 components and APIs, AccessibilityInfo is supported as well.
About using JavascriptInterface for TTS in Vega, I will check internally and update you ASAP.
In the meantime, please try using VoiceView and AccessibilityInfo API and let me know if they work for your usecase.
Needed a few more info from you.
What is the goal here? Is the app trying to get the screen reader to speak correctly, or force certain speech?
Do you have any examples of what you are trying to accomplish?
That would be helpful to provide sufficient guidance.
Requirement : Does Vega provide an app-level TTS API that works without requiring system-wide VoiceView to be enabled?
Latest Update from Kepler Team : Currently “Kepler” don’t support individual TTS implementation with in application, by not enabling the accessibility feature from system settings.
Thanks for your reply. However we are not clear about your initial request.
So, if you would still like to have your initial conversation going, we would need a few more info from you.
What is the goal here? Is the app trying to get the screen reader to speak correctly, or force certain speech?
Do you have any examples of what you are trying to accomplish?
That would be helpful to provide sufficient guidance.
One last question on the use case.
Is this meant to be a self voicing app? As in, are you trying to use TTS instead of the screen reader?
Or are you trying to just make one announcement?
Checking again.
Is this meant to be a self voicing app? As in, are you trying to use TTS instead of the screen reader?
Or are you trying to just make one announcement?
Android OS has an API called android.speech.tts.TextToSpeech. Using this API, we can enable the app to read text aloud without requiring TTS to be enabled at the device level, as we control this functionality from the app level.
We are looking for a similar API in Kepler (Vega OS).