The current Chrome OS TTS system has several components interacting with Mojo services and JS extensions. On the client side (e.g., JS applications like Select-to-Speak), the client uses chrome.tts to manipulate text-to-speech. Then, Chrome’s underlying TTS mechanism talks to a specific TTS engine implemented with the chrome.ttsEngine APIs. For example, the Google TTS engine has a JS Extension component (see Google’s internal codebase) implemented with the chrome.ttsEngine APIs. The TTS engine’s JS Extension component uses chrome.mojoPrivate APIs to connect native C++ Mojo services (see Google TTS engine’s native implementation) with chrome.ttsEngine APIs.
It is also possible to implement a TTS engine purely in JS without native C++ implementations. The TTS engine simply needs to implement all the logic in its JS Extension with the chrome.ttsEngine APIs. For example, the network-based TTS engine only has a JS component.
We can implement a new, independent Mojo service in //chromeos/services for fetching data from Google's internal API. In the JS Extension of the TTS engine, we process the fetched data and handle TTS logic. This design option is similar to the design of network-based TTS engine, except that we hide the key inside the Mojo service.
Another option is to implement another native TTS engine and its Mojo service. The implementation will be under //chromeos/services/tts. We will still need a light-weight JS Extension to connect with chrome.ttsEngine APIs. This design option is similar to the Google TTS engine’s design.
--
You received this message because you are subscribed to the Google Groups "services-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to services-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/services-dev/CAHQHEJfVs1z4noDrRMn8moujBL6HK4-ctkaUnCwnv0zhx%2B8-cw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/services-dev/CAKARY_%3DZxHFQBxFDJ-FztnmGkWt90dE%3D8g5_55%3DVB9wtcFkSfA%40mail.gmail.com.
drive-by question....Are you interested in mojo services because:1) You have some non-chromium C++ code (like from google3) that you need to run in a separate sandboxed process for security reasons, or2) You have some JS code that needs to make network requests, but you want to hide the API key in C++ land where devtools can't see?I couldn't tell from a quick scan of the design doc.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/services-dev/CAKLzqjHbOPSqjje%3DogjkMJfjcYPhJHgPoNY1r7C54UVWV2TKJg%40mail.gmail.com.
+dmazzoni as he is the a11y expert and is most likely to provide input on the best way to accomplish what you are after.-Scott
On Tue, May 18, 2021 at 5:15 AM 'James Cook' via services-dev <servic...@chromium.org> wrote:drive-by question....Are you interested in mojo services because:1) You have some non-chromium C++ code (like from google3) that you need to run in a separate sandboxed process for security reasons, or2) You have some JS code that needs to make network requests, but you want to hide the API key in C++ land where devtools can't see?I couldn't tell from a quick scan of the design doc.If it's (2), my instinct would be to take Design Option 1 specified below, i.e., limit the service interface and C++ to strictly the part that can't be done in JS. Caveat: I'm going just by the information that you've given on this thread :).
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/services-dev/CAMGE5NF5RT500eUpkjukELXAL%2BbZ-M%3DOSkWrxiPY3pS62hhzGQ%40mail.gmail.com.
Thank you all for the suggestions.I made a sample change for adding mojo and service for fetching audio data. As mentioned earlier, we would like to use the service in JS extension. One related example is Remote Apps., which uses chrome.mojoPrivate.requireAsync to initialize the service on the JS side.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/services-dev/CAKLzqjHWN9uE2hxE%2Bx7dr%2B%3Dgst2JRMP5_wttCE50h9mnhpGcXQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/services-dev/CAMGE5NENUHrN7jWJ-%3Dpe4LyG2mTdzNvdDz5QqHZk7n%2BCMRxa%3DA%40mail.gmail.com.