YSKSpeechRecognitionViewControllerDelegate protocol

#import <YSKSpeechRecognitionViewControllerDelegate.h>

Protocol of the delegate called by the basic recognizer (YSKSpeechRecognitionViewController).

These methods are called during the recognition lifecycle. The delegate will be notified when the recognition process starts and finishes (successfully or with an error).

Instance methods

-speechRecognitionViewController:didFailWithError:

Called if the recognition process failed with an error.

-speechRecognitionViewController:didFinishWithResult:

Called when the recognition process completes successfully.

Method descriptions

-speechRecognitionViewController:didFailWithError:

- (void) speechRecognitionViewController:(YSKSpeechRecognitionViewController *) speechRecognitionViewController
didFailWithError:(NSError *) error

Called if the recognition process failed with an error.

Various errors may occur during recognition. Some of them are handled by the recognizer itself, while others cannot be processed by it. This function is called only if the recognizer can't correct the error, or when the user canceled the request.
Note.

This method is called only if speech recognition failed with an error. Otherwise, speechRecognitionViewController:didFinishWithResult: is called.

Parameters:
error

Error during speech recognition.

-speechRecognitionViewController:didFinishWithResult:

- (void) speechRecognitionViewController:(YSKSpeechRecognitionViewController *) speechRecognitionViewController
didFinishWithResult:(NSString *) result

Called when the recognition process completes successfully.

This is the mechanism used by the recognizer to provide recognition results. The method is called only if speech was recognized successfully. Otherwise, speechRecognitionViewController:didFailWithError: is called.
Parameters:
result

string containing the recognition result.