Contents

speechSynthesizer(_:willSpeakWord:of:)

Sent just before a synthesized word is spoken through the sound output device.

Declaration

@MainActor optional func speechSynthesizer(_ sender: NSSpeechSynthesizer, willSpeakWord characterRange: NSRange, of string: String)

Parameters

  • sender:

    An Nsspeechsynthesizer object that’s synthesizing text into speech.

  • characterRange:

    Word that sender is about to speak into the sound output device.

  • string:

    Text that is being synthesized by sender.

Discussion

One use of this method might be to visually highlight the word being spoken.

See Also

Related Documentation

Synthesizing Speech