Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
Android Documentation
Speak

Class Speak

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage
             com.smartdevicelink.proxy.RPCRequest

Package
com.smartdevicelink.proxy.rpc

Overview

Speaks a phrase over the vehicle audio system using SDL's TTS (text-to-speech) engine. The provided text to be spoken can be simply a text phrase, or it can consist of phoneme specifications to direct SDL's TTS engine to speak a "speech-sculpted" phrase

Receipt of the Response indicates the completion of the Speak operation, regardless of how the Speak operation may have completed (i.e. successfully, interrupted, terminated, etc.)

Requesting a new Speak operation while the application has another Speak operation already in progress (i.e. no corresponding Response for that in-progress Speak operation has been received yet) will terminate the in-progress Speak operation (causing its corresponding Response to be sent by SDL) and begin the requested Speak operation

Requesting a new Speak operation while the application has an Alert operation already in progress (i.e. no corresponding Response for that in-progress Alert operation has been received yet) will result in the Speak operation request being rejected (indicated in the Response to the Request)

Requesting a new Alert operation while the application has a Speak operation already in progress (i.e. no corresponding Response for that in-progress Speak operation has been received yet) will terminate the in-progress Speak operation (causing its corresponding Response to be sent by SDL) and begin the requested Alert operation

Requesting a new Speak operation while the application has a PerformInteraction operation already in progress (i.e. no corresponding Response for that in-progress PerformInteraction operation has been received yet) will result in the Speak operation request being rejected (indicated in the Response to the Request)

Requesting a PerformInteraction operation while the application has a Speak operation already in progress (i.e. no corresponding Response for that in-progress Speak operation has been received yet) will terminate the in-progress Speak operation (causing its corresponding Response to be sent by SDL) and begin the requested PerformInteraction operation

HMI Status Requirements:

HMILevel: FULL, Limited

AudioStreamingState: Any

SystemContext: MAIN, MENU, VR

Notes:

  • When Alert is issued with MENU in effect, Alert is queued and "played" when MENU interaction is completed (i.e. SystemContext reverts to MAIN). When Alert is issued with VR in effect, Alert is queued and "played" when VR interaction is completed (i.e. SystemContext reverts to MAIN)
  • When both Alert and Speak are queued during MENU or VR, they are "played" back in the order in which they were queued, with all existing rules for "collisions" still in effect

Parameter List

Name Type Description Reg. Notes Ver. Available
ttsChunks String An array of 1-100 TTSChunk structs which, taken together, specify the phrase to be spoken. Y

The array must have 1-100 elements.

The total length of the phrase composed from the ttsChunks provided must be less than 500 characters or the request will be rejected.

Each chunk can be no more than 500 characters.
SmartDeviceLink 1.0

Response

This Response notifies the application of the completion, interruption, or failure of a Speak Request.

Non-default Result Codes:

SUCCESS

INVALID_DATA

OUT_OF_MEMORY

APPLICATION_NOT_REGISTERED

TOO_MANY_PENDING_REQUESTS

GENERIC_ERROR

REJECTED

DISALLOWED

ABORTED

Additional Notes: