---
title: SFSpeechRecognitionTask
framework: speech
role: symbol
role_heading: Class
path: speech/sfspeechrecognitiontask
---

# SFSpeechRecognitionTask

A task object for monitoring the speech recognition progress.

## Declaration

```swift
class SFSpeechRecognitionTask
```

## Overview

Overview Use an SFSpeechRecognitionTask object to determine the state of a speech recognition task, to cancel an ongoing task, or to signal the end of the task. You don’t create speech recognition task objects directly. Instead, you receive one of these objects after calling recognitionTask(with:resultHandler:) or recognitionTask(with:delegate:) on your SFSpeechRecognizer object.

## Topics

### Canceling a speech recognition task

- [cancel()](speech/sfspeechrecognitiontask/cancel().md)
- [isCancelled](speech/sfspeechrecognitiontask/iscancelled.md)

### Finishing a speech recognition task

- [finish()](speech/sfspeechrecognitiontask/finish().md)
- [isFinishing](speech/sfspeechrecognitiontask/isfinishing.md)

### Monitoring recognition progress

- [state](speech/sfspeechrecognitiontask/state.md)
- [SFSpeechRecognitionTaskState](speech/sfspeechrecognitiontaskstate.md)
- [error](speech/sfspeechrecognitiontask/error.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### In-progress requests

- [SFSpeechRecognitionTaskDelegate](speech/sfspeechrecognitiontaskdelegate.md)
- [SFSpeechRecognitionTaskState](speech/sfspeechrecognitiontaskstate.md)
