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

Implemented By

Supported Methods

Description of Methods

Say(text as String) as Integer

textA UTF8 string

Causes the string specified by text to be spoken. Returns an ID for the spoken string to notify observer callbacks about a specific spoken string.

Silence(duration as Integer) as Integer

durationTime in milliseconds

Causes text to speech to continue to suppress any application background sound for the amount of time specified by duration. 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.

Flush()

Interrupts and stops any current text to speech spoken string, to be used when the application does not want to the text to speech to continue.

IsEnabled() as Boolean

Returns the enabled setting of text to speech. Text to speech may be enabled or disabled for various technical reasons (for example, on some platforms, text to speech may only be enabled once in connected mode). This is not affected by the state of any of its clients. In particular, it does not depend on whether a CVAA compliant accessibility feature is enabled or not.

GetAvailableLanguages() as Object

Returns an array containing the current list of languages available for text to speech.

SetLanguage(name as String)

nameThe name of an available text to speech language

Sets the language specified by name for text to speech, from one of the available languages returned by GetAvailableLanguages().

GetLanguage() as String

Returns the name of the currently-selected text to speech language.

GetAvailableVoices() as Object

Returns an array containing the current list of voices available for text to speech.

SetVoice(name as String)

nameThe name of an available text to speech voice

Sets the voice specified by name for text to speech, from one of the available voices returned by GetAvailableVoices().

GetVoice() as String

Returns the currently-selected voice.

GetVolume() as Integer

Returns the volume at which text is spoken. The value ranges from 0 for muted to 1000 for the highest volume. The default value is 1000.

SetVolume(volume as Integer)

volumeThe volume at which text is spoken. The value ranges from 0 for muted to 1000 for the highest volume. The default value is 1000.

GetRate() as Integer

Available since firmware version 7.5

Returns the rate at which text is spoken. The value ranges from -40 to 200 with a default value of 0.

SetRate(rate as Integer) as Void

Available since firmware version 7.5

rate

Sets the rate at which text is spoken. The possible values range from -40 to 200.

GetPitch() as Integer

Available since firmware version 7.5

Returns the pitch at which text is spoken. The possible values range from -60 to +60.

SetPitch(pitch as Integer) as Void

Available since firmware version 7.5

pitchSets the pitch at which text is spoken. The possible values range from -60 to +60.