---
title: SpeechWordCFProcPtr
framework: applicationservices
role: symbol
role_heading: Type Alias
path: applicationservices/speechwordcfprocptr
---

# 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

```swift
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 doc://com.apple.documentation/documentation/applicationservices/1461621-speakcfstring call.
- `wordRange`: The range of characters in aString that corresponds to the word.

## Discussion

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

- [SpeechDoneProcPtr](applicationservices/speechdoneprocptr.md)
- [SpeechErrorProcPtr](applicationservices/speecherrorprocptr.md)
- [SpeechErrorCFProcPtr](applicationservices/speecherrorcfprocptr.md)
- [SpeechPhonemeProcPtr](applicationservices/speechphonemeprocptr.md)
- [SpeechSyncProcPtr](applicationservices/speechsyncprocptr.md)
- [SpeechTextDoneProcPtr](applicationservices/speechtextdoneprocptr.md)
- [SpeechWordProcPtr](applicationservices/speechwordprocptr.md)
