Contents

startSpeaking(_:)

Begins speaking synthesized text through the system’s default sound output device.

Declaration

func startSpeaking(_ string: String) -> Bool

Parameters

  • string:

    Text to speak. When nil or empty, no synthesis occurs.

Return Value

true when speaking starts successfully, false otherwise.

Discussion

If the receiver is currently speaking synthesized speech when startSpeaking(_:) is called, that process is stopped before text is spoken.

When synthesis of text finishes normally or is stopped, the message speechSynthesizer(_:didFinishSpeaking:) is sent to the delegate.

See Also

Synthesizing Speech