TextToSpeechInput

@objc
public class TextToSpeechInput : NSObject

Input parameters for speech synthesis. Parameters are considered transient and may change each time synthesize is called.

See also

TextToSpeech.synthesize
  • Initializer for a new TextToSpeechInput instance.

    Declaration

    Swift

    @objc
    public init(_ input:String = "Here I am, a brain the size of a planet.",
                voice: String = "demo-male",
                inputFormat: TTSInputFormat = .text,
                id: String = UUID().description)

    Parameters

    input

    The text input to the speech synthesizer.

    voice

    The synthetic voice used to generate speech.

    inputFormat

    The formatting of the input.

    id

    A unique identifier for this input request.

  • The synthetic voice used to generate speech.

    Declaration

    Swift

    @objc
    public var voice: String
  • The input to the synthetic voice.

    Note

    SSML must be valid XML.

    Declaration

    Swift

    @objc
    public var input: String
  • The formatting of the input.

    Declaration

    Swift

    @objc
    public var inputFormat: TTSInputFormat
  • id

    A unique identifier for this input request.

    Declaration

    Swift

    @objc
    public var id: String