Instance Method

pauseSpeaking(at:)

Pauses speech at the specified boundary constraint.

Declaration

func pauseSpeaking(at boundary: AVSpeechBoundary) -> Bool

Parameters

boundary

A constant describing whether speech should pause immediately or only after finishing the word currently being spoken.

Return Value

true if speech has paused, or false otherwise.

Discussion

The boundary parameter also affects the manner in which the synthesizer, once paused, continues speech upon a call to continueSpeaking(). If paused with boundary constraint AVSpeechBoundary.immediate, speech continues from exactly the point at which it was paused, even if that point occurred in the middle of pronouncing a word. If paused with AVSpeechBoundary.word, speech continues from the word following the word on which it was paused.

See Also

Controlling Speech Synthesis

func continueSpeaking() -> Bool

Continues speech from the point at which it left off.

var isPaused: Bool

A Boolean value that indicates whether speech has been paused.

var isSpeaking: Bool

A Boolean value that indicates whether the synthesizer is speaking.

func stopSpeaking(at: AVSpeechBoundary) -> Bool

Stops all speech at the specified boundary constraint.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software