Mac Developer Library

Developer

AppKit Framework Reference NSSpeechRecognizerDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSSpeechRecognizerDelegate

Inheritance


Not Applicable

Conforms To


Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.6 and later.

The NSSpeechRecognizerDelegate protocol defines the optional methods implemented by delegates of NSSpeechRecognizer objects.

  • Invoked when the recognition engine has recognized the application command command.

    Declaration

    Swift

    optional func speechRecognizer(_ sender: NSSpeechRecognizer, didRecognizeCommand command: AnyObject?)

    Objective-C

    - (void)speechRecognizer:(NSSpeechRecognizer *)sender didRecognizeCommand:(id)command

    Discussion

    command is one of the strings from the array passed to setCommands:. The delegate typically evaluates which command was recognized and performs the related action.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.3 and later.

    Available as part of an informal protocol prior to OS X v10.6.