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 phrases are detected in the audio stream. |
-phraseSpotterDidStarted | Called when audio recording starts. |
-phraseSpotterDidStopped | Called when audio recording stops. |
-phraseSpotterDidFailWithError: | Called if an error occurs while YSKPhraseSpotter is working. |
-phraseSpotterDidSpotPhrase:withIndex: | Called when phrases are detected in the audio stream. |
-phraseSpotterDidStarted | Called when audio recording starts. |
-phraseSpotterDidStopped | Called when audio recording stops. |
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 phrases are detected in the audio stream.
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 | Phrase index. |
phrase | Phrase. |
phraseIndex | Phrase index. |
-phraseSpotterDidStarted
- (void) phraseSpotterDidStarted |
- (void) phraseSpotterDidStarted |
Called when audio recording starts.
-phraseSpotterDidStopped
- (void) phraseSpotterDidStopped |
- (void) phraseSpotterDidStopped |
Called when audio recording stops.