Protocol YSKPhraseSpotterDelegate

The protocol defines the callbacks of the delegate that tracks the voice activation process.

Instance Methods

-phraseSpotter:didFailWithError:

Called if an error occurs during voice activation.

-phraseSpotter:didSpotPhrase:withIndex:

Called when the audio stream contains a phrase that is present in the enabled voice activation model (activation command).

-phraseSpotterDidStarted:

Called when audio recording starts.

Method Detail

-phraseSpotter:didFailWithError:

- (void)phraseSpotter:(YSKPhraseSpotter *)phraseSpotter
     didFailWithError:(NSError *)error 

Called if an error occurs during voice activation.

Parameters:
phraseSpotter

Link to the object of the YSKPhraseSpotter class that invoked the method.

error

An error that occurred during the operation.

-phraseSpotter:didSpotPhrase:withIndex:

- (void)phraseSpotter:(YSKPhraseSpotter *)phraseSpotter
        didSpotPhrase:(NSString *)phrase
            withIndex:(NSInteger)phraseIndex 

Called when the audio stream contains a phrase that is present in the enabled voice activation model (activation command).

Parameters:
phraseSpotter

Link to the object of the YSKPhraseSpotter class that invoked the method.

phrase

Recognized phrase.

phraseIndex

Index (number) of the activation command.

-phraseSpotterDidStarted:

- (void)phraseSpotterDidStarted:(YSKPhraseSpotter *)phraseSpotter 

Called when audio recording starts.

Parameters:
phraseSpotter

Link to the object of the YSKPhraseSpotter class that invoked the method.