Protocol

SFSpeechRecognitionTaskDelegate

A protocol with methods for managing multi-utterance speech recognition requests.

Declaration

@protocol SFSpeechRecognitionTaskDelegate

Overview

The methods of this protocol give you fine-grained control over the speech recognition process. Specifically, you use this protocol when you want to know the following:

  • When the first utterances of speech occur in the audio.

  • When the speech recognizer stops accepting audio.

  • When the speech recognition process finishes or is canceled.

  • When the speech recognizer generates a potential transcription.

Adopt the methods of this protocol in an object and pass that object in to the delegate parameter of recognitionTaskWithRequest:delegate: when starting your speech recognition task.

Topics

Tracking the Task Progress

- speechRecognitionDidDetectSpeech:

Tells the delegate when the task first detects speech in the source audio.

- speechRecognitionTaskFinishedReadingAudio:

Tells the delegate when the task is no longer accepting new audio input, even if final processing is in progress.

Getting Transcriptions

- speechRecognitionTask:didHypothesizeTranscription:

Tells the delegate that a hypothesized transcription is available.

Finishing a Speech Recognition Task

- speechRecognitionTask:didFinishRecognition:

Tells the delegate when the final utterance is recognized.

- speechRecognitionTask:didFinishSuccessfully:

Tells the delegate when the recognition of all requested utterances is finished.

- speechRecognitionTaskWasCancelled:

Tells the delegate that the task has been canceled.

Relationships

Inherits From

See Also

Performing Speech Recognition on Audio

- recognitionTaskWithRequest:resultHandler:

Executes the speech recognition request and delivers the results to the specified handler block.

- recognitionTaskWithRequest:delegate:

Recognizes speech from the audio source associated with the specified request, using the specified delegate to manage the results.