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.2 and later.

Available since firmware version 7.2

The roTextToSpeech component sends the roTextToSpeechEvent with the following predicates that indicate its valid event types.

GetIndex() as Integer

Returns the ID of the speech as returned by either the Say() or Silence() methods of the ifTextToSpeech interface. Since the text to speech service may be shared among any number of clients, the IDs returned to a given client are not necessarily contiguous. The value is only meaningful if GetData() returned 0, 1 or 2; it returns 0 otherwise.

GetData() as Integer

Returns one of the following integer values:

0

Started speech

1

Speech has completed

2

Speech has been interrupted/flushed

3

Text to speech has been either enabled or disabled

4

Current language has been changed

5

Current voice has been changed

6Speech rate has been changed
7

Speech volume has been changed

GetInfo() as Object

Returns an associative array with the following key-value pairs, depending the value returned by the GetData() method:

KeyType Value
EnabledBoolean

If GetData() returned 3, indicates the enabled/disabled status of text to speech

LanguageString

If GetData() returned 4, indicates the new language

VoiceString

If GetData() returned 5, indicates the new voice

RateInteger

If GetData() returned 6, indicates the new speech rate

VolumeInteger

If GetData() returned 7, indicates the new speech volume