Contents

SpeechWordCFProcPtr

Defines a pointer to a Core Foundation-based word callback function that is called by the Speech Synthesis Manager before it pronounces a word.

Declaration

typealias SpeechWordCFProcPtr = (SpeechChannel, SRefCon, CFString, CFRange) -> Void

Parameters

  • chan:

    The speech channel that has finished processing input text.

  • refCon:

    The reference constant associated with the speech channel.

  • aString:

    A string containing the original text passed to the speech synthesizer in the 1461621 Speakcfstring call.

  • wordRange:

    The range of characters in aString that corresponds to the word.

Discussion

A word callback function defined by the SpeechWordCFProcPtr is the Core Foundation-based equivalent of a word callback function defined by SpeechWordProcPtr. The Speech Synthesis Manager calls a speech channel’s word callback function just before it pronounces a word. You might use such a callback function, for example, to highlight the word about to be spoken in a window.

You can specify a word callback function by passing the kSpeechWordCFCallBack property to theSetSpeechProperty(_:_:_:) function.

See Also

Callbacks