TTS implementation

App Name: Xumo Play

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

  1. What is the recommended TTS approach for Kepler apps?

  2. Is AccessibilityInfo working in the current Kepler version?

  3. Can we use JavascriptInterface bridge to native Android TTS?

  4. If any documentation or code examples are available, please share the details.

Hey @manoj_d_b

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.

Warm regards,
Ivy

Hi @manoj_d_b

There is no native bridge to Android TTS on Vega.

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.

Warm regards,
Ivy

Hi @Ivy_Mahajan

Thanks for share the details,

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.

Hi @manoj_d_b

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.

Warm regards,
Ivy

Hi @Ivy_Mahajan

I missed to provide the exact requirement at first, as I mentioned in my previous reply.

We were trying to build a custom TTS feature within the application, so the TTS will make the announcement within our XUMO play application only.

Thank you @manoj_d_b for the details.

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?

Warm regards,
Ivy

Hi @manoj_d_b

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?

Warm regards,
Ivy

Hi @Ivy_Mahajan

We are trying to implement a screen reader itself.

But our requirement is, not to enable the TTS from device level setting, the below option in Accessibility section.

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).

Best Regards,

Manoj

Understood, thanks @manoj_d_b !

Hey @manoj_d_b

Which toolkit does Xumo play app use to build? Is it a webview app or a KeplerScript app?

Warm regards,
Ivy

Hey @manoj_d_b

Closing this topic as we have not heard back from you. Please feel free to create a new topic for futher questions/issues.
Happy to help!

Warm regards,
Ivy