<!--
{
  "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(_:didCancel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(pl)AVSpeechSynthesizerDelegate(im)speechSynthesizer:didCancelSpeechUtterance:"
  },
  "title" : "speechSynthesizer(_:didCancel:)"
}
-->

# speechSynthesizer(_:didCancel:)

Tells the delegate when the synthesizer cancels speaking an utterance.

```
optional func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didCancel utterance: AVSpeechUtterance)
```

## Parameters

`synthesizer`

The speech synthesizer that cancels speaking the utterance.

`utterance`

The utterance that the speech synthesizer cancels speaking.

## Discussion

The system only calls this method if a speech synthesizer is speaking an utterance and the system calls its [`stopSpeaking(at:)`](/documentation/AVFAudio/AVSpeechSynthesizer/stopSpeaking(at:)) method. The system doesn’t call this method if the synthesizer is in a delay between utterances when speech stops, and it doesn’t call it for unspoken utterances.

---

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)