Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLSpeak Class Reference

Section Contents

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 SDLAlert operation already in progress (i.e. no corresponding Response for that in-progress SDLAlert operation has been received yet) will result in the Speak operation request being rejected (indicated in the Response to the Request)

Requesting a new SDLAlert 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 SDLAlert operation

Requesting a new Speak operation while the application has a SDLPerformInteraction operation already in progress (i.e. no corresponding Response for that in-progress SDLPerformInteraction operation has been received yet) will result in the Speak operation request being rejected (indicated in the Response to the Request)

Requesting a SDLPerformInteraction 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 SDLPerformInteraction operation

HMI Status Requirements:

  • HMILevel: FULL, Limited
  • AudioStreamingState: Any
  • SystemContext: MAIN, MENU, VR
  • Notes:

  • When SDLAlert is issued with MENU in effect, SDLAlert is queued and played when MENU interaction is completed (i.e. SystemContext reverts to MAIN). When SDLAlert is issued with VR in effect, SDLAlert is queued and played when VR interaction is completed (i.e. SystemContext reverts to MAIN)
  • When both SDLAlert 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
  • Additional Notes:

  • Total character limit depends on platform.
  • Chunks are limited to 500 characters; however you can have multiple TTS chunks.
  • On old systems there is a total character limit of 500 characters across all chunks. This could vary according to the VCA.
  • @since SmartDeviceLink 1.0

    See

    SDLAlert

    -initWithTTS:

    Undocumented

    Objective-C

    - (instancetype)initWithTTS:(NSString *)ttsText;

    Swift

    init(tts ttsText: String)

    -initWithTTSChunks:

    Undocumented

    Objective-C

    - (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks;

    Swift

    init(ttsChunks: [SDLTTSChunk])

    ttsChunks

    An array of TTSChunk structs which, taken together, specify the phrase to be spoken

    @discussion The total length of the phrase composed from the ttsChunks provided must be less than 500 characters or the request will be rejected

    Required, Array of SDLTTSChunk, Array size 1 - 100

    See

    SDLTTSChunk

    Objective-C

    @property (readwrite, strong, nonatomic)
        NSArray<SDLTTSChunk *> *_Nonnull ttsChunks;

    Swift

    var ttsChunks: [SDLTTSChunk] { get set }
    View on GitHub.com
    Previous Section Next Section