<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 10.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/SFSpeechRecognitionTaskDelegate/speechRecognitionTaskWasCancelled(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "c:objc(pl)SFSpeechRecognitionTaskDelegate(im)speechRecognitionTaskWasCancelled:"
  },
  "title" : "speechRecognitionTaskWasCancelled(_:)"
}
-->

# speechRecognitionTaskWasCancelled(_:)

Tells the delegate that the task has been canceled.

```
optional func speechRecognitionTaskWasCancelled(_ task: SFSpeechRecognitionTask)
```

## Parameters

`task`

The speech recognition task (an [`SFSpeechRecognitionTask`](/documentation/Speech/SFSpeechRecognitionTask) object) that represents the request.

## Discussion

A speech recognition task can be canceled by the user, by your app, or by the system.

---

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)