SpeechRecognitionProtocol Protocol Reference

Declared in SpeechRecognitionService.h

Overview

The speech recognition callback protocol

– onPartialResponseReceived: required method

Called when a partial response is received from the speech recognition service

- (void)onPartialResponseReceived:(NSString *)partialResult

Parameters

partialResult

The partial result received from the recognition service.

Discussion

Called when a partial response is received from the speech recognition service

Declared In

SpeechRecognitionService.h

– onFinalResponseReceived: required method

Called when a final response is received from the service.

- (void)onFinalResponseReceived:(RecognitionResult *)result

Parameters

result

The final phrase result received from the recognition service.

Discussion

Called when a final response is received from the service.

Declared In

SpeechRecognitionService.h

– onError:withErrorCode: required method

Called when a non-speech error occurs.

Non-speech errors include connection and authorization errors.

- (void)onError:(NSString *)errorMessage withErrorCode:(int)errorCode

Parameters

errorMessage

A optional error message describing the error.

errorCode

The error code being signaled.

Discussion

Called when a non-speech error occurs.

Non-speech errors include connection and authorization errors.

Declared In

SpeechRecognitionService.h

– onMicrophoneStatus: required method

Called when the microphone recording status has changed.

- (void)onMicrophoneStatus:(Boolean)recording

Parameters

recording

A flag that indicates whether the microphone is currently recording.

Discussion

Called when the microphone recording status has changed.

Declared In

SpeechRecognitionService.h

– onIntentReceived:

Called when intent is received from the service

- (void)onIntentReceived:(IntentResult *)intent

Parameters

intent

The intent response received from the recognition service.

Discussion

Called when intent is received from the service

Declared In

SpeechRecognitionService.h

– onLogEvent:

- (void)onLogEvent:(unsigned long)eventId