Text to Speech (TTS) Intents

WearHF provides a TTS (text to speech) service which allows your app to speak text out to the user using the HMT’s speaker. This provides an alternate way to provide information other than using the screen.

Send a string to the TTS service

If you want WearHF to read out a string of text using TTS, use the following intent.

Intent

com.realwear.ttsservice.intent.action.TTS

Extras

ExtraTypeDescription
text_to_speakStringThe string that the TTS service should read to the user
pause_speech_recognizerbooleantrue if the speech recognizer should be paused while TTS is reading out the text to the user

false if the speech recognizer should continue to accept voice commands while TTS is reading out the text to the user

tts_idintA unique ID that will be passed back when the TTS service has completed reading out the text

Response Intents

When the TTS service beings playing out your text it will send out an intent to let your app know.

com.realwear.ttsservice.intent.action.TTS_STARTED

Extras

ExtraTypeDescription
tts_idintThe unique ID that was provided with the start TTS intent

When the TTS service has finished playing out your text it will send out an intent to let your app know.

com.realwear.ttsservice.intent.action.TTS_FINISHED

Extras

ExtraTypeDescription
tts_idintThe unique ID that was provided with the start TTS intent

Example

For an example of how to use TTS in your app, see our developer example.