Audio data for various SDLScreenManager views
The text-to-speech prompts that will used and/or audio files that will be played. The audio prompts and files will be played in the same order they are added.
@property (nonatomic, copy, readonly, nullable) NSArray<SDLTTSChunk *> *audioData;
var audioData: [SDLTTSChunk]? { get }
Initialize with an SDLFile holding data or pointing to a file on the file system. When this object is passed to an Alert
or Speak
, the file will be uploaded if it is not already, then played if the system supports that feature.
@discussion Only available on systems supporting RPC Spec v5.0+
- (nonnull instancetype)initWithAudioFile:(nonnull SDLFile *)audioFile;
init(audioFile: SDLFile)
The audio file to be played by the system
Initialize with a string to be spoken by the system speech synthesizer.
- (nonnull instancetype)initWithSpeechSynthesizerString:
(nonnull NSString *)spokenString;
init(speechSynthesizerString spokenString: String)
The string to be spoken by the system speech synthesizer
Initialize with a string to be spoken by the system speech synthesizer using a phonetic string.
- (nonnull instancetype)
initWithPhoneticSpeechSynthesizerString:(nonnull NSString *)phoneticString
phoneticType:
(nonnull SDLSpeechCapabilities)phoneticType;
init(phoneticSpeechSynthesizerString phoneticString: String, phoneticType: SDLSpeechCapabilities)
The string to be spoken by the system speech synthesizer
Must be one of SAPI_PHONEMES
, LHPLUS_PHONEMES
, TEXT
, or PRE_RECORDED
or no object will be created
Use another init method instead.
- (nonnull instancetype)init;
Add additional SDLFiles holding data or pointing to a file on the file system. When this object is passed to an Alert
or Speak
, the file will be uploaded if it is not already, then played if the system supports that feature.
- (void)addAudioFiles:(nonnull NSArray<SDLFile *> *)audioFiles;
func addAudioFiles(_ audioFiles: [SDLFile])
An array of audio file to be played by the system
Create additional strings to be spoken by the system speech synthesizer.
- (void)addSpeechSynthesizerStrings:
(nonnull NSArray<NSString *> *)spokenStrings;
func addSpeechSynthesizerStrings(_ spokenStrings: [String])
The strings to be spoken by the system speech synthesizer
Create additional strings to be spoken by the system speech synthesizer using a phonetic string.
- (void)addPhoneticSpeechSynthesizerStrings:
(nonnull NSArray<NSString *> *)phoneticStrings
phoneticType:
(nonnull SDLSpeechCapabilities)phoneticType;
func addPhoneticSpeechSynthesizerStrings(_ phoneticStrings: [String], phoneticType: SDLSpeechCapabilities)
The strings to be spoken by the system speech synthesizer
Must be one of SAPI_PHONEMES
, LHPLUS_PHONEMES
, TEXT
, or PRE_RECORDED
or no object will be created