<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 7.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVSpeechSynthesizerDelegate/speechSynthesizer(_:willSpeakRangeOfSpeechString:utterance:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(pl)AVSpeechSynthesizerDelegate(im)speechSynthesizer:willSpeakRangeOfSpeechString:utterance:"
  },
  "title" : "speechSynthesizer(_:willSpeakRangeOfSpeechString:utterance:)"
}
-->

# speechSynthesizer(_:willSpeakRangeOfSpeechString:utterance:)

Tells the delegate when the synthesizer is about to speak a portion of an utterance’s text.

```
optional func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, willSpeakRangeOfSpeechString characterRange: NSRange, utterance: AVSpeechUtterance)
```

## Parameters

`synthesizer`

The speech synthesizer that’s about to speak an utterance.

`characterRange`

The range of characters in the utterance’s [`speechString`](/documentation/AVFAudio/AVSpeechUtterance/speechString) that correspond to the unit of speech the synthesizer is about to speak.

`utterance`

The utterance that the speech synthesizer is about to speak.

## Discussion

The system calls this method once for each unit of speech in the utterance’s text, which is generally a word.

> Tip:
> Implement this method if you want to provide a user interface to visually highlight each word as the synthesizer speaks it.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)