YSKVocalizerDelegate protocol

#import <YSKVocalizerDelegate.h>

The delegate defines callback methods for tracking speech synthesis events.

Methods are called by an object of the YSKVocalizer class when its state changes: the starting, pausing, or completion of speech synthesis, or an error occurs. When synthesized speech is played through the embedded SpeechKit player, the methods are called when starting, pausing, and ending the speech production.

Instance methods

-vocalizer:didFailWithError:

Called when an error occurs.

-vocalizer:didFinishSynthesisWithResult:markerIds:markerMsecs:

Called when the server finished speech synthesis and it can be played back.

-vocalizer:didReachMarker:atMsec:
-vocalizerDidBeginSynthesis:

Called when speech synthesis is launched.

-vocalizerDidFinishPlaying:

Called when the embedded SpeechKit player finishes producing audio.

-vocalizerDidStartPlaying:

Called when the embedded SpeechKit player starts producing audio.

Method descriptions

-vocalizer:didFailWithError:

- (void) vocalizer:(YSKVocalizer *) vocalizer
didFailWithError:(NSError *) error

Called when an error occurs.

Parameters:
error

Error code (see YSKError).

-vocalizer:didFinishSynthesisWithResult:markerIds:markerMsecs:

- (void) vocalizer:(YSKVocalizer *) vocalizer
didFinishSynthesisWithResult:(NSData *) result
markerIds:(NSArray *) markerIds
markerMsecs:(NSArray *) markerMsecs

Called when the server finished speech synthesis and it can be played back.

Parameters:
vocalizer

Reference to the text vocalizer object that called the method.

result

Results of speech synthesis.

-vocalizer:didReachMarker:atMsec:

- (void) vocalizer:(YSKVocalizer *) vocalizer
didReachMarker:(NSString *) markerId
atMsec:(float) msec

-vocalizerDidBeginSynthesis:

- (void) vocalizerDidBeginSynthesis:(YSKVocalizer *) vocalizer

Called when speech synthesis is launched.

-vocalizerDidFinishPlaying:

- (void) vocalizerDidFinishPlaying:(YSKVocalizer *) vocalizer

Called when the embedded SpeechKit player finishes producing audio.

-vocalizerDidStartPlaying:

- (void) vocalizerDidStartPlaying:(YSKVocalizer *) vocalizer

Called when the embedded SpeechKit player starts producing audio.