Available since firmware version 7.5

Please note this component is only available on the following devices: Roku Streaming Stick (3600X), Roku Express (3700X) and Express+ (3710X), Roku Premiere (4620X) and Premiere+ (4630X), Roku Ultra (4640X), and any Roku TV running Roku OS version 7.5 and later.

Implemented By

Supported Methods

Description of Methods

Say (text as String, flushSpeech as Boolean, dontRepeat as Boolean) as Integer

Speaks the specified text string. This method does nothing if Audio Guide is currently disabled.

Parameter(s):

  • text: the string to be spoken
  • flushSpeech: 
    • true: Audio Guide will immediately stop speaking any other speech before speaking
    • false: Audio Guide will wait until any current speech is done before speaking
  • dontRepeat:
    • true: calling say() with the same text will be ignored
    • false: calling say() with the same text will be spoken

This method returns an ID for the spoken string to notify observer callbacks about a specific spoken string. This ID can be used with roTextToSpeechEvent.

This method will automatically split up text to reduce lag. Due to this automatic splitting, the roTextToSpeechEvent 0 ("Started speech") event for the returned ID may not be sent until later than expected. The roTextToSpeechEvents 1 ("Speech has completed") and 2 ("Speech has been flushed") events are sent at the expected times.

This method also uses the correct voice, language, volume, and speech rate for Audio Guide and tries to be "smart" by pre-processing the text for correct pronunciation of items such as currency, email addresses, acronyms, media-related names and titles, etc.

For more control over what is said, use roTextToSpeech.Say() which does not pre-process the text, set volume, rate, etc.

Flush()

Interrupts and stops any current text to speech spoken string, to be used when the application does not want the text to speech to continue. Note that this call is equivalent to roTextToSpeech.Flush(), and stops speech started using both roAudioGuide.Say() and roTextToSpeech.Say().

Silence(duration as Integer) as Integer

If Audio Guide is enabled, causes text to speech to continue to suppress any application background sound for the amount of time specified by duration (in milliseconds). This can be used to add clarity for longer spoken text that may have pauses that might otherwise allow application background sound to be heard. This method does nothing if Audio Guide is currently disabled.