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.

Method descriptions

-phraseSpotterDidFailWithError:

- (void) phraseSpotterDidFailWithError:(NSError *) error

Called if an error occurs while YSKPhraseSpotter is working.

Parameters:
error

Error.

-phraseSpotterDidSpotPhrase:withIndex:

- (void) phraseSpotterDidSpotPhrase:(NSString *) phrase
withIndex:(int) phraseIndex

Called when phrases are detected in the audio stream.

Note.

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.

Note.

Avoid locking in this method, because YSKPhraseSpotter calls it in the same stream as it records audio in.

Parameters:
phrase

Phrase.

phraseIndex

Phrase index.

-phraseSpotterDidStarted

- (void) phraseSpotterDidStarted

Called when audio recording starts.

-phraseSpotterDidStopped

- (void) phraseSpotterDidStopped

Called when audio recording stops.