Platforms to show: All Mac Windows Linux Cross-Platform

Back to SFSpeechRecognizerMBS class.

SFSpeechRecognizerMBS.authorizationStatus as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SpeechRecognition MBS MacFrameworks Plugin 19.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns your app's current authorization to perform speech recognition.

The user can reject your app's request to perform speech recognition, but your request can also be denied if speech recognition is not supported on the device. The app can also change your app's authorization status at any time from the Settings app.

SFSpeechRecognizerMBS.available as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SpeechRecognition MBS MacFrameworks Plugin 19.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether the Speech Framework was loaded.

Returns true on MacOS 10.15 or newer.

SFSpeechRecognizerMBS.requestAuthorization(delegateHandler as requestAuthorizationCompletedMBS = nil, tag as variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SpeechRecognition MBS MacFrameworks Plugin 19.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Asks the user to allow your app to perform speech recognition.

delegateHandler: The delegate to execute when your app's authorization status is known. The status parameter of the delegate contains your app's authorization status.

Call this method before performing any other tasks associated with speech recognition. This method executes asynchronously, returning shortly after you call it. At some point later, the system calls the provided handler block with the results.
When your app's authorization status is SFSpeechRecognizerAuthorizationStatusNotDetermined, this method causes the system to prompt the user to grant or deny permission for your app to use speech recognition. The prompt includes the custom message you specify in the NSSpeechRecognitionUsageDescription key of your app's Info.plist file. The user's response is saved so that future calls to this method do not prompt the user again.

Your app's Info.plist file must contain the NSSpeechRecognitionUsageDescription key with a valid usage description. If this key is not present, your app will crash when you call this method.
For more information about requesting authorization, see Asking Permission to Use Speech Recognition.

SFSpeechRecognizerMBS.supportedLocales as NSLocaleMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SpeechRecognition MBS MacFrameworks Plugin 19.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the set of locales that are supported by the speech recognizer.

This method returns the locales for which speech recognition is supported. Support for a locale does not guarantee that speech recognition is currently possible for that locale. For some locales, the speech recognizer requires an active Internet connection to communicate with Apple's servers. If the speech recognizer is currently unable to process requests, available returns NO.
Speech recognition supports the same locales that are supported by the keyboard's dictation feature. For a list of these locales, see QuickType Keyboard: Dictation.

Some examples using this method:

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...