Class Speak
- 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:
Total character limit depends on platform. Chunks are limited to 500 characters; however you can have multiple TTS chunks. On Gen 1.1 there is a total character limit of 500 characters across all chunks. This could vary according to the VCA.
Quick Jump
- Fields
-
- Constructors
-
- Methods
-
Fields
KEY_TTS_CHUNKS
public static final java.lang.String KEY_TTS_CHUNKS
- Constant Value
- "ttsChunks"
Inherited Fields
From Class |
Fields |
com.smartdevicelink.proxy.RPCRequest
|
onResponseListener
|
com.smartdevicelink.proxy.RPCMessage
|
KEY_REQUEST,
KEY_RESPONSE,
KEY_NOTIFICATION,
KEY_FUNCTION_NAME,
KEY_PARAMETERS,
KEY_CORRELATION_ID,
messageType,
parameters,
function
|
com.smartdevicelink.proxy.RPCStruct
|
KEY_BULK_DATA,
KEY_PROTECTED,
store
|
Constructors
Speak()
Constructs a new Speak object
Speak(
java.util.Hashtable<java.lang.String, java.lang.Object> hash
)
Constructs a new Speak object indicated by the Hashtable parameter
public Speak(java.util.Hashtable<java.lang.String, java.lang.Object> hash)
Constructor Parameters
- hash
- The Hashtable to use
Speak(
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks
)
Constructs a new Speak object
public Speak(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks)
Constructor Parameters
- ttsChunks
- An array of 1-100 TTSChunk structs which, taken together, specify the phrase to be spoken.
Methods
getTtsChunks()
Gets a List representing an array of 1-100 TTSChunk structs
which, taken together, specify the phrase to be spoken
public java.util.List getTtsChunks()
setTtsChunks(
java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks
)
Sets a List representing an array of 1-100 TTSChunk structs
which, taken together, specify the phrase to be spoken
public com.smartdevicelink.proxy.rpc.Speak setTtsChunks(java.util.List<com.smartdevicelink.proxy.rpc.TTSChunk> ttsChunks)
Method Parameters
- ttsChunks
- a List value representing an array of 1-100 TTSChunk structs
which specify the phrase to be spoken
- 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
Inherited Methods
From Class |
Methods |
com.smartdevicelink.proxy.RPCRequest
|
getCorrelationID,
setCorrelationID,
setOnRPCResponseListener,
getOnRPCResponseListener
|
com.smartdevicelink.proxy.RPCMessage
|
getFunctionID,
getFunctionName,
setFunctionName,
getMessageType,
setParameters,
getParameters,
getObject,
getString,
getInteger,
getFloat,
getDouble,
getBoolean,
getLong
|
com.smartdevicelink.proxy.RPCStruct
|
getStoreValue,
getStore,
deserializeJSON,
serializeJSON,
serializeJSON,
format,
getBulkData,
setBulkData,
setPayloadProtected,
isPayloadProtected,
getMessageTypeName,
hasKey,
setValue,
getValue,
getObject,
formatObject,
getValueForString,
getString,
getInteger,
getDouble,
getFloat,
getBoolean,
getLong,
clone,
equals,
hashCode
|
java.lang.Object
|
getClass,
hashCode,
equals,
clone,
toString,
notify,
notifyAll,
wait,
wait,
wait,
finalize
|
View on GitHub.com