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
Name | Type |
---|---|
utterance |
Utterance
|
Response
Name | Type |
---|---|
payload |
Engine_Enqueue_Result
|
Speak
Speaks all enqueued utterances. The method returns the value when they are all finished playing.
Request
<EMPTY>
Response
Name | Type |
---|---|
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
Name | Type |
---|---|
engine |
client_end:Engine
|
Response
Name | Type |
---|---|
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
Name | Type |
---|---|
engine_request |
server_end:Engine
|
Response
Name | Type |
---|---|
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.
Name | Value | Description |
---|---|---|
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.
Ordinal | Field | Type | Description |
---|---|---|---|
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(https://fxbug.dev/42090141): Add extra voice parameters such as speech rate and pitch.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
language |
fuchsia.intl/LocaleId
|
The current selected language. |
UNIONS
EngineRegistry_RegisterEngine_Result strict
Defined in fuchsia.accessibility.tts/tts_registration.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
EngineRegistry_RegisterEngine_Response
|
|
2 |
err |
Error
|
Engine_Enqueue_Result strict
Defined in fuchsia.accessibility.tts/tts.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Engine_Enqueue_Response
|
|
2 |
err |
Error
|
Engine_Speak_Result strict
Defined in fuchsia.accessibility.tts/tts.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Engine_Speak_Response
|
|
2 |
err |
Error
|
TtsManager_OpenEngine_Result strict
Defined in fuchsia.accessibility.tts/tts_manager.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
TtsManager_OpenEngine_Response
|
|
2 |
err |
Error
|