Google is committed to advancing racial equity for Black communities. See how.

fuchsia.accessibility.tts

PROTOCOLS

Engine

Defined in fuchsia.accessibility.tts/tts.fidl

An interface to produce speech output. Assistive technology use an Engine to start producing speech output and set configuration parameters that control the speech. TODO(fxbug.dev/17829): Implement pause, stop and resume.

Cancel

Cancels current speech and also empties the queue.

Request

NameType

Response

NameType

Enqueue

Enqueues an utterance to be spoken. Speech is not started until Speak is called.

Request

NameType
utterance Utterance

Response

NameType
result Engine_Enqueue_Result

Speak

Speaks all enqueued utterances. The method returns the value when they are all finished playing.

Request

NameType

Response

NameType
result Engine_Speak_Result

EngineRegistry

Defined in fuchsia.accessibility.tts/tts_registration.fidl

An interface for TTS Engines provide speech output.

RegisterEngine

A TTS engine registers itself to start listening for incoming speech output requests through engine. At the moment, only one TTS Engine can be registered at a time. This registry owners the first engine to register itself. If an engine crashes and wants to register again, calling this method will restart the connection. An error is returned if another engine is already registered.

Request

NameType
engine Engine

Response

NameType
result EngineRegistry_RegisterEngine_Result

TtsManager

Defined in fuchsia.accessibility.tts/tts_manager.fidl

An interface to manage TTS for assistive technology.

The TTS Manager offers assistive technology a way to open a TTS engine to start producing speech output.

OpenEngine

A speaker is an assistive technology that wants to produce speech output. Only one speaker is allowed to have an open connection to the engine at a time. If already in use, BUSY error is returned.

Request

NameType
engine_request request<Engine>

Response

NameType
result TtsManager_OpenEngine_Result

STRUCTS

EngineRegistry_RegisterEngine_Response

Defined in fuchsia.accessibility.tts/tts_registration.fidl

NameTypeDescriptionDefault

Engine_Enqueue_Response

Defined in fuchsia.accessibility.tts/tts.fidl

NameTypeDescriptionDefault

Engine_Speak_Response

Defined in fuchsia.accessibility.tts/tts.fidl

NameTypeDescriptionDefault

TtsManager_OpenEngine_Response

Defined in fuchsia.accessibility.tts/tts_manager.fidl

NameTypeDescriptionDefault

ENUMS

Error

Type: uint32

Defined in fuchsia.accessibility.tts/tts.fidl

Error codes for TTS operations.

NameValueDescription
NOT_IMPLEMENTED 1

The underlying TTS engine does not support this operation.

OUT_OF_RANGE 2

The value is out of range for a particular TTS parameter.

BAD_STATE 3

The operation is impossible to be completed.

BUSY 4

This operation can not be completed because the TTS service is in use.

TABLES

Utterance

Defined in fuchsia.accessibility.tts/tts.fidl

An utterance holds information about its message and how it should be spoken.

OrdinalNameTypeDescription
1 message string

The message to be spoken. Clients should pay attention to the FIDL maximum size for a message, splitting when necessary into several utterances.

2 params VoiceParameters

Parameters that control the speech output.

VoiceParameters

Defined in fuchsia.accessibility.tts/tts.fidl

Parameters of a voice. TODO(fxbug.dev/16795): Add extra voice parameters such as speech rate and pitch.

OrdinalNameTypeDescription
1 language fuchsia.intl/LocaleId

The current selected language.

UNIONS

EngineRegistry_RegisterEngine_Result

Defined in fuchsia.accessibility.tts/tts_registration.fidl

NameTypeDescription
response EngineRegistry_RegisterEngine_Response
err Error

Engine_Enqueue_Result

Defined in fuchsia.accessibility.tts/tts.fidl

NameTypeDescription
response Engine_Enqueue_Response
err Error

Engine_Speak_Result

Defined in fuchsia.accessibility.tts/tts.fidl

NameTypeDescription
response Engine_Speak_Response
err Error

TtsManager_OpenEngine_Result

Defined in fuchsia.accessibility.tts/tts_manager.fidl

NameTypeDescription
response TtsManager_OpenEngine_Response
err Error