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
iOS Documentation
SDLAudioData

SDLAudioData Class Reference

Section Contents

Overview

Audio data for various SDLScreenManager views

audioData

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.

Objective-C

@property (nonatomic, copy, readonly, nullable) NSArray<SDLTTSChunk *> *audioData;

Swift

var audioData: [SDLTTSChunk]? { get }

-initWithAudioFile:

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+

Objective-C

- (nonnull instancetype)initWithAudioFile:(nonnull SDLFile *)audioFile;

Swift

init(audioFile: SDLFile)

Parameters

audioFile

The audio file to be played by the system

-initWithSpeechSynthesizerString:

Initialize with a string to be spoken by the system speech synthesizer.

Objective-C

- (nonnull instancetype)initWithSpeechSynthesizerString:
    (nonnull NSString *)spokenString;

Swift

init(speechSynthesizerString spokenString: String)

Parameters

spokenString

The string to be spoken by the system speech synthesizer

-initWithPhoneticSpeechSynthesizerString:phoneticType:

Initialize with a string to be spoken by the system speech synthesizer using a phonetic string.

Objective-C

- (nonnull instancetype)
    initWithPhoneticSpeechSynthesizerString:(nonnull NSString *)phoneticString
                               phoneticType:
                                   (nonnull SDLSpeechCapabilities)phoneticType;

Swift

init(phoneticSpeechSynthesizerString phoneticString: String, phoneticType: SDLSpeechCapabilities)

Parameters

phoneticString

The string to be spoken by the system speech synthesizer

phoneticType

Must be one of SAPI_PHONEMES, LHPLUS_PHONEMES, TEXT, or PRE_RECORDED or no object will be created

-init

Use another init method instead.

Objective-C

- (nonnull instancetype)init;

-addAudioFiles:

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.

Objective-C

- (void)addAudioFiles:(nonnull NSArray<SDLFile *> *)audioFiles;

Swift

func addAudioFiles(_ audioFiles: [SDLFile])

Parameters

audioFiles

An array of audio file to be played by the system

-addSpeechSynthesizerStrings:

Create additional strings to be spoken by the system speech synthesizer.

Objective-C

- (void)addSpeechSynthesizerStrings:
    (nonnull NSArray<NSString *> *)spokenStrings;

Swift

func addSpeechSynthesizerStrings(_ spokenStrings: [String])

Parameters

spokenStrings

The strings to be spoken by the system speech synthesizer

-addPhoneticSpeechSynthesizerStrings:phoneticType:

Create additional strings to be spoken by the system speech synthesizer using a phonetic string.

Objective-C

- (void)addPhoneticSpeechSynthesizerStrings:
            (nonnull NSArray<NSString *> *)phoneticStrings
                               phoneticType:
                                   (nonnull SDLSpeechCapabilities)phoneticType;

Swift

func addPhoneticSpeechSynthesizerStrings(_ phoneticStrings: [String], phoneticType: SDLSpeechCapabilities)

Parameters

phoneticStrings

The strings to be spoken by the system speech synthesizer

phoneticType

Must be one of SAPI_PHONEMES, LHPLUS_PHONEMES, TEXT, or PRE_RECORDED or no object will be created

View on GitHub.com
Previous Section Next Section