---
title: "SpeakCFString(_:_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1461621-speakcfstring
---

# SpeakCFString(_:_:_:)

Begins speaking a string represented as a CFString object.

## Declaration

```swift
func SpeakCFString(_ chan: SpeechChannel, _ aString: CFString, _ options: CFDictionary?) -> OSErr
```

## Parameters

- `chan`: The speech channel through which speech is to be spoken.
- `aString`: The string to be spoken, represented as a CFString object.
- `options`: An optional dictionary of key-value pairs used to customize speech behavior. See doc://com.apple.documentation/documentation/applicationservices/speech_synthesis_manager/synthesizer_option_keys for the available keys.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion The SpeakCFString function is the Core Foundation-based equivalent of the SpeakBuffer function. The SpeakCFString function converts the text string specified in aString into speech, using the voice and control settings in effect for the speech channel specified in chan. (Before you use SpeakCFString, therefore, be sure you’ve created a speech channel with the NewSpeechChannel(_:_:) function.) The SpeakCFString function generates speech asynchronously, which means that control is returned to your application before speech has finished, perhaps even before the speech is first audible. If SpeakCFString is called while the speech channel is currently speaking the contents of another text string, the speech stops immediately and the new text string is spoken as soon as possible.

## See Also

### Starting, Stopping, and Pausing Speech

- [ContinueSpeech(_:)](applicationservices/1462728-continuespeech.md)
- [PauseSpeechAt(_:_:)](applicationservices/1461174-pausespeechat.md)
- [StopSpeech(_:)](applicationservices/1462745-stopspeech.md)
- [StopSpeechAt(_:_:)](applicationservices/1459780-stopspeechat.md)
