Class

SFSpeechRecognitionTask

A speech recognition task that lets you monitor recognition progress.

Overview

A speech recognizer returns an SFSpeechRecognitionTask object when it begins recognition. You can use the task object to monitor the progress of speech recognition and cancel it, if necessary.

Topics

Canceling a Speech Recognition Task

func cancel()

Cancels the current speech recognition task.

var isCancelled: Bool

A Boolean value that indicates whether the speech recognition task has been canceled.

Finishing a Speech Recognition Task

func finish()

Stops accepting new audio and finishes processing on the audio input that has already been accepted.

var isFinishing: Bool

A Boolean value that indicates whether audio input has stopped.

Monitoring Recognition Progress

var state: SFSpeechRecognitionTaskState

The current state of the speech recognition task.

var error: Error?

An error object that specifies the error that occurred during a speech recognition task.

Relationships

Inherits From

Conforms To

See Also

Requesting Recognition and Monitoring Progress

class SFSpeechAudioBufferRecognitionRequest

A request to recognize speech provided in audio buffers.

class SFSpeechRecognitionRequest

A request to recognize speech from an audio source.

class SFSpeechURLRecognitionRequest

A request to recognize speech in a recorded audio file.