fuchsia.accessibility.tts

Added: 11

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(https://fxbug.dev/42091290): Implement pause, stop and resume.

Cancel

Cancels current speech and also empties the queue.

Request

<EMPTY>

Response

<EMPTY>

Enqueue

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

Request

NameType
utterance Utterance

Response

NameType
payload Engine_Enqueue_Result

Speak

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

Request

<EMPTY>

Response

NameType
payload 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
payload 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 server_end<Engine>

Response

NameType
payload TtsManager_OpenEngine_Result

STRUCTS

EngineRegistry_RegisterEngine_Response

Defined in fuchsia.accessibility.tts/tts_registration.fidl

<EMPTY>

Engine_Enqueue_Response

Defined in fuchsia.accessibility.tts/tts.fidl

<EMPTY>

Engine_Speak_Response

Defined in fuchsia.accessibility.tts/tts.fidl

<EMPTY>

TtsManager_OpenEngine_Response

Defined in fuchsia.accessibility.tts/tts_manager.fidl

<EMPTY>

ENUMS

Error strict

Type: uint32

Defined in fuchsia.accessibility.tts/tts.fidl

Error codes for TTS operations.

NameValueDescription
1

The underlying TTS engine does not support this operation.

2

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

3

The operation is impossible to be completed.

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.

OrdinalFieldTypeDescription
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.

params VoiceParameters

Parameters that control the speech output.

VoiceParameters

Defined in fuchsia.accessibility.tts/tts.fidl

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

OrdinalFieldTypeDescription
language fuchsia.intl/LocaleId

The current selected language.

UNIONS

EngineRegistry_RegisterEngine_Result strict

Defined in fuchsia.accessibility.tts/tts_registration.fidl

OrdinalVariantTypeDescription
response EngineRegistry_RegisterEngine_Response
err Error

Engine_Enqueue_Result strict

Defined in fuchsia.accessibility.tts/tts.fidl

OrdinalVariantTypeDescription
response Engine_Enqueue_Response
err Error

Engine_Speak_Result strict

Defined in fuchsia.accessibility.tts/tts.fidl

OrdinalVariantTypeDescription
response Engine_Speak_Response
err Error

TtsManager_OpenEngine_Result strict

Defined in fuchsia.accessibility.tts/tts_manager.fidl

OrdinalVariantTypeDescription
response TtsManager_OpenEngine_Response
err Error