YSKPhraseSpotterDelegate protocol
#import <YSKPhraseSpotterDelegate.h>
The protocol defines the callbacks of the delegate that is called by YSKPhraseSpotter.
Instance methods
-phraseSpotterDidFailWithError: | Called if an error occurs while YSKPhraseSpotter is working. |
-phraseSpotterDidSpotPhrase:withIndex: | Called when the audio stream has phrases that are contained in the enabled voice activation model (activation commands). |
-phraseSpotterDidStarted | Called when voice activation is started. |
-phraseSpotterDidStopped | Called when voice activation is stopped. |
-phraseSpotterDidFailWithError: | Called if an error occurs while YSKPhraseSpotter is working. |
-phraseSpotterDidSpotPhrase:withIndex: | Called when the audio stream has phrases that are contained in the enabled voice activation model (activation commands). |
-phraseSpotterDidStarted | Called when voice activation is started. |
-phraseSpotterDidStopped | Called when voice activation is stopped. |
Method descriptions
-phraseSpotterDidFailWithError:
- (void) phraseSpotterDidFailWithError: | (NSError *) error |
- (void) phraseSpotterDidFailWithError: | (NSError *) error |
Called if an error occurs while YSKPhraseSpotter is working.
error | Error. |
error | Error. |
-phraseSpotterDidSpotPhrase:withIndex:
- (void) phraseSpotterDidSpotPhrase: | (NSString *) phrase |
withIndex: | (int) phraseIndex |
- (void) phraseSpotterDidSpotPhrase: | (NSString *) phrase |
withIndex: | (int) phraseIndex |
Called when the audio stream has phrases that are contained in the enabled voice activation model (activation commands).
YSKPhraseSpotter does not release audio resources when this method is being called. If necessary, you can stop YSKPhraseSpotter by sending it the message YSKPhraseSpotter.stop.
Avoid locking in this method, because YSKPhraseSpotter calls it in the same stream as it records audio in.
phrase | Phrase. |
phraseIndex | The index (number) of the activation command. |
phrase | Phrase. |
phraseIndex | The index (number) of the activation command. |
-phraseSpotterDidStarted
- (void) phraseSpotterDidStarted |
- (void) phraseSpotterDidStarted |
Called when voice activation is started.
When audio recording begins.
-phraseSpotterDidStopped
- (void) phraseSpotterDidStopped |
- (void) phraseSpotterDidStopped |
Called when voice activation is stopped.
When audio recording ends.