Class

SFSpeechRecognizer

A supported speech recognizer.

Overview

A speech recognizer recognizes only one language. When you use the default initializer, you get a speech recognizer for the device's current locale, if a recognizer is supported for that locale. Note that a supported speech recognizer is not the same as an available speech recognizer; for example, the recognizers for some locales may require an Internet connection. You can use the supportedLocales method to get a list of supported locales and the available property to find out if the recognizer for a specific locale is available.

Topics

Getting the User's Permission

requestAuthorization:

Asks the user to grant your app permission to perform speech recognition.

authorizationStatus

Returns the status of the authorization request to perform speech recognition.

Creating a Speech Recognizer and Setting the Delegate

init

Creates a speech recognizer for the device's current locale, if supported.

initWithLocale:

Creates a speech recognizer for the specified locale, if supported.

delegate

The delegate for the speech recognizer.

Performing a Speech Recognition Task

recognitionTaskWithRequest:delegate:

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

recognitionTaskWithRequest:resultHandler:

Recognizes speech from the audio source associated with the specified request, using the specified completion handler to handle the results.

defaultTaskHint

A hint that indicates the type of speech recognition being requested.

Getting Information About a Recognizer

available

A Boolean value that indicates whether the speech recognizer is available.

locale

The locale of the speech recognizer.

supportedLocales

Returns a set of locales that support speech recognition.

queue

The queue used by the speech recognizer for recognition task handlers and delegate messages.

Relationships

Inherits From