OSSUtteranceConfiguration

public struct OSSUtteranceConfiguration

Value-style speech parameters used to construct a fresh AVFoundation utterance for every synthesis request.

  • Speech rate to apply to the utterance.

    Declaration

    Swift

    public var rate: Float
  • Pitch multiplier to apply to the utterance.

    Declaration

    Swift

    public var pitchMultiplier: Float
  • Playback volume to apply to the utterance.

    Declaration

    Swift

    public var volume: Float
  • Delay before the utterance begins speaking.

    Declaration

    Swift

    public var preUtteranceDelay: TimeInterval
  • Delay after the utterance finishes speaking.

    Declaration

    Swift

    public var postUtteranceDelay: TimeInterval
  • Creates speech synthesis parameters for an utterance.

    Declaration

    Swift

    public init(
        rate: Float = AVSpeechUtteranceDefaultSpeechRate,
        pitchMultiplier: Float = 1,
        volume: Float = 1,
        preUtteranceDelay: TimeInterval = 0,
        postUtteranceDelay: TimeInterval = 0
    )

    Parameters

    rate

    Speech rate to apply.

    pitchMultiplier

    Pitch multiplier to apply.

    volume

    Playback volume to apply.

    preUtteranceDelay

    Delay before speaking begins.

    postUtteranceDelay

    Delay after speaking finishes.