I would like to read some text to the user, just like it's possible in Mirror API. Is that possible in Google Glass GDK via Intent?
It's not an intent, but you can use the Android TextToSpeech class for this purpose. Essentially, just create an instance of TextToSpeech and then call the speak method with the string you want it to speak.
There is some initialization overhead involved with the TTS engine so you should try to do it early — you may experience a delay if you try to initialize the engine at the exact moment that you want it to speak.
The CompassService class in the GDK Compass sample shows this in more detail.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With