TTSMessage

public enum TTSMessage : Equatable

Defines a message that should be vocalized. Represents different types of text-to-speech messages that can be vocalized.

The TTSMessage enum specifies different types of messages that can be used in text-to-speech (TTS) operations. It provides cases for messages with handling options and messages with phonetic transcriptions. This is useful in scenarios where text needs to be converted to speech with specific handling options or phonetic accuracy.

Example usage:

let ttsMessage: TTSMessage = .audio(message: "Welcome to TomTom!", type: .plain)
// Use `ttsMessage` to vocalize the message.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • Message with handling options.

    Declaration

    Swift

    case audio(message: String, type: MessageType)

    Parameters

    message

    Text of the message.

    type

    Type of message.

  • Message with phonetic transcriptions that should be parsed for correct playback.

    Declaration

    Swift

    case tagged(message: String, phonetics: [PhoneticTranscription])

    Parameters

    message

    Text of the message.

    phonetics

    List of phonetic transcriptions.

  • The text of the message to be vocalized.

    Declaration

    Swift

    public var message: String { get }