Speech to text API for a WebView app

We’ve found two contradictory answers in the forum.
In this thread, Amazon staff suggested to “leverage chromium default Ax mechanism or use KeplerScript speech APIs”.
In this other thread, Amazon staff answered that VegaOS does not expose an app-level speech-to-text API like Android’s SpeechRecognizer, and that STT only works through the built-in system keyboard.
I couldn’t find any KeplerScript speech API in the docs. Could you clarify which one applies?

  • If theKeplerScript speech API exist: documentation, URL, …
  • If they don’t: please confirm it, and tell us what is supported today for a Vega WebView app.

Thanks!

Hi @Sergio_Gomez,

Thanks for flagging the two threads - I can see why they read as contradictory. Here’s the clarification.

Regarding the “KeplerScript speech API” mentioned in the earlier thread:

VegaOS does not expose an app-level speech-to-text API like Android’s SpeechRecognizer for custom speech recognition flows. The KeplerScript APIs in this area are the Accessibility API (VoiceView/screen reader - speech output, not recognition) and the Audio Lib (audio routing/volume - no speech recognition). There is no separate KeplerScript speech-recognition API for building a custom, app-controlled STT flow.

What is supported today: Speech-to-text is supported through the platform’s built-in keyboard - when a text field (TextInput) is focused, the virtual keyboard shows a microphone icon, and the user can press and hold the Alexa button and speak.

For WebView apps specifically, keyboard support requires adding the following to your manifest.toml

[[wants.service]]
id = "com.amazon.inputmethod.service"

And setting hasTVPreferredFocus={true} on the WebView component. See the guide here: How to Enable Keyboard in your Vega app

References:

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya