public class TTSChunk extends RPCStruct
Specifies what is to be spoken. This can be simply a text phrase, which SDL will speak according to its own rules. It can also be phonemes from either the Microsoft SAPI phoneme set, or from the LHPLUS phoneme set. It can also be a pre-recorded sound in WAV format (either developer-defined, or provided by the SDL platform).
In SDL, words, and therefore sentences, can be built up from phonemes and are used to explicitly provide the proper pronunciation to the TTS engine. For example, to have SDL pronounce the word "read" as "red", rather than as when it is pronounced like "reed", the developer would use phonemes to express this desired pronunciation.
For more information about phonemes, see http://en.wikipedia.org/wiki/Phoneme
.Parameter List
| Name | Type | Description | SmartDeviceLink Ver. Available |
|---|---|---|---|
| text | String | Text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field. | SmartDeviceLink 1.0 |
| type | SpeechCapabilities | Indicates the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound). | SmartDeviceLink 1.0 |
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_TEXT |
static String |
KEY_TYPE |
KEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
TTSChunk()
Constructs a newly allocated TTSChunk object
|
TTSChunk(Hashtable<String,Object> hash)
Constructs a newly allocated TTSChunk object indicated by the Hashtable parameter
|
TTSChunk(String text,
SpeechCapabilities type)
Constructs a newly allocated TTSChunk object
|
| Modifier and Type | Method and Description |
|---|---|
String |
getText()
Get text to be spoken, or a phoneme specification, or the name of a pre-recorded sound.
|
SpeechCapabilities |
getType()
Get the type of information in the "text" field (e.g.
|
TTSChunk |
setText(String text)
Set the text to be spoken, or a phoneme specification, or the name of a pre-recorded sound.
|
TTSChunk |
setType(SpeechCapabilities type)
Set the type of information in the "text" field (e.g.
|
clone, deserializeJSON, equals, format, formatObject, getBoolean, getBulkData, getDouble, getFloat, getInteger, getLong, getMessageTypeName, getObject, getStore, getStoreValue, getString, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_TEXT
public static final String KEY_TYPE
public TTSChunk()
public TTSChunk(Hashtable<String,Object> hash)
hash - The Hashtable to usepublic TTSChunk(@NonNull
String text,
@NonNull
SpeechCapabilities type)
text - Text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field.type - Indicates the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound).public String getText()
public TTSChunk setText(@NonNull String text)
text - to be spoken, or a phoneme specification, or the name of a pre-recorded sound.public SpeechCapabilities getType()
public TTSChunk setType(@NonNull SpeechCapabilities type)
type - the type of information in the "text" field