|
KeenASR Framework v2.1 (8b72cc4)
Keen Research
|
#include <KIOSRecognizer.h>
Instance Methods | |
Mandatory callback methods | |
| (void) | - unwindAppAudioBeforeAudioInterrupt |
Optional callback methods | |
| (void) | - triggerPhraseDetected: |
| (void) | - recognizerTriggerPhraseDetectedForRecognizer: |
| (void) | - recognizerPartialResult:forRecognizer: |
| (void) | - recognizerFinalResponse:forRecognizer: |
| (void) | - recognizerReadyToListenAfterInterrupt: |
The KIOSRecognizerDelegate protocol defines optional methods implemented by delegates of the KIOSRecognizer class.
Partial recognition result is a result that's periodically (100ms or so) reported while recognition is still in progress.
Final recognition result is a result that's reported after the engine determined that there hasn't been any voice activity for a predefined duration of time, as specifed by VAD endpointing settings.
|
optionalrequired |
This method is called when recognizer has finished the recognition on its own because one of the VAD rules has triggered. At this time, recognizer is not listening any more.
| response | final response of the recognition |
| recognizer | recognizer that produced the result |
|
optionalrequired |
This method is called when recognizer has a new (different than before) partial recognition result. If decoding graph was built with trigger phrase support this method will not be called until trigger phrase occurs.
| result | partial result of the recognition |
| recognizer | recognizer that produced the result |
|
optionalrequired |
This method is called when recognizer is ready to listen again, after being interrupted due to audio interrupt (incoming call, etc.) or because the app went to the background. See KIOSRecognizer for more details on handling interrupts. You will typically setup UI elements in this callback (e.g. enable "Start Listening" button), or explictly call startListening if your app is expected to listen as soon as the view has appeared.
| recognizer | the recognizer |
|
optional |
This method is called when trigger phrase has been recognized (in case decoding graph was built with trigger phrase support).
| recognizer | recognizer that recognized the trigger phrase |
| - (void) unwindAppAudioBeforeAudioInterrupt |
This method is called when audio interrupt occurs. It will be called in synchronous manner immediately before KIOSRecognizer starts unwinding its audio stack. You would use this method to stop playing any audio that is controlled directly by your app. Your app should not modify AVAudioSession state nor interact with the recognizer at this point.