ISSpeechRecognitionDelegate Protocol Reference
| Conforms to | NSObject |
| Declared in | ISSpeechRecognition.h |
Overview
Delegate protocol for ISSpeechRecognition.
The only required method is for getting the result from speech recognition.
Tasks
-
– recognition:didGetRecognitionResult:Speech recognition successfully completed, and a result was sent back from the server.
required method -
– recognition:didFailWithError:Something went wrong, speech recognition failed, and an error was passed back.
-
– recognitionCancelledByUser:Speech recognition was cancelled by the user. This method is only called if it was the user that cancelled recognition. It will not be called if you call –[ISSpeechRecognition cancel].
-
– recognitionDidBeginRecording:Recording the user’s speech has started.
-
– recognitionDidFinishRecording:Speech recognition has finished recording and is moving on to recognizing the text.
Instance Methods
recognition:didFailWithError:
Something went wrong, speech recognition failed, and an error was passed back.
- (void)recognition:(ISSpeechRecognition *)speechRecognition didFailWithError:(NSError *)errorParameters
- speechRecognition
The speech recognition instance that was cancelled.
- error
The acutal error. Errors from the SDK internals will have the error domain of
iSpeechErrorDomain. You may get some URL connection errors if something happens with the network.
Declared In
ISSpeechRecognition.hrecognition:didGetRecognitionResult:
Speech recognition successfully completed, and a result was sent back from the server.
- (void)recognition:(ISSpeechRecognition *)speechRecognition didGetRecognitionResult:(ISSpeechRecognitionResult *)resultParameters
- speechRecognition
The speech recognition instance that completed.
- result
The result text and confidence level.
Discussion
If you get no result text back, and a confience level of 0.0, then, most likely, the user didn’t speak anything.
Declared In
ISSpeechRecognition.hrecognitionCancelledByUser:
Speech recognition was cancelled by the user. This method is only called if it was the user that cancelled recognition. It will not be called if you call –[ISSpeechRecognition cancel].
- (void)recognitionCancelledByUser:(ISSpeechRecognition *)speechRecognitionParameters
- speechRecognition
The speech recognition instance that was cancelled.
Declared In
ISSpeechRecognition.hrecognitionDidBeginRecording:
Recording the user’s speech has started.
- (void)recognitionDidBeginRecording:(ISSpeechRecognition *)speechRecognitionParameters
- speechRecognition
The speech recognition instance that started recording audio.
Declared In
ISSpeechRecognition.hrecognitionDidFinishRecording:
Speech recognition has finished recording and is moving on to recognizing the text.
- (void)recognitionDidFinishRecording:(ISSpeechRecognition *)speechRecognitionParameters
- speechRecognition
The speech recognition instance that finished recording.
Discussion
This happens when the timeout is hit for a timed listen, or when the user taps the “Done” button on the dialog.
Declared In
ISSpeechRecognition.h