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.
@since SmartDeviceLink 1.0
Initialize with text and a type
- (nonnull instancetype)initWithText:(nonnull NSString *)text
type:(nonnull SDLSpeechCapabilities)type;
init(text: String, type: SDLSpeechCapabilities)
The string to be spoken
The type of text the string is
The RPC
Create TTS using text
+ (nonnull NSArray<SDLTTSChunk *> *)textChunksFromString:
(nonnull NSString *)string;
class func textChunks(from string: String) -> [SDLTTSChunk]
The text chunk
The RPC
Create TTS using SAPI
+ (nonnull NSArray<SDLTTSChunk *> *)sapiChunksFromString:
(nonnull NSString *)string;
class func sapiChunks(from string: String) -> [SDLTTSChunk]
The SAPI chunk
The RPC
Create TTS using LH Plus
+ (nonnull NSArray<SDLTTSChunk *> *)lhPlusChunksFromString:
(nonnull NSString *)string;
class func lhPlusChunks(from string: String) -> [SDLTTSChunk]
The LH Plus chunk
The RPC
Create TTS using prerecorded chunks
+ (nonnull NSArray<SDLTTSChunk *> *)prerecordedChunksFromString:
(nonnull NSString *)string;
class func prerecordedChunks(from string: String) -> [SDLTTSChunk]
The prerecorded chunk
The RPC
Create TTS using silence
+ (nonnull NSArray<SDLTTSChunk *> *)silenceChunks;
class func silenceChunks() -> [SDLTTSChunk]
The RPC
Create “TTS” to play an audio file previously uploaded to the system.
+ (nonnull NSArray<SDLTTSChunk *> *)fileChunksWithName:
(nonnull NSString *)fileName;
class func fileChunks(withName fileName: String) -> [SDLTTSChunk]
The name of the file used in the SDLFile or PutFile that was uploaded
The RPC
Text to be spoken, a phoneme specification, or the name of a pre-recorded / pre-uploaded sound. The contents of this field are indicated by the “type” field.
Required, Max length 500
@property (nonatomic, strong) NSString *_Nonnull text;
var text: String { get set }
The type of information in the “text” field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound).
Required
@property (nonatomic, strong) SDLSpeechCapabilities _Nonnull type;
var type: SDLSpeechCapabilities { get set }