Protocol YSKVocalizerDelegate

The protocol defines the callbacks of the delegate that tracks speech synthesis and playback events.

Methods are called by an object of the class that implements the YSKVocalizing protocol when its state changes: the receipt of speech synthesis results, the end of speech synthesis, and the occurrence of errors. If synthesized speech is played through the embedded player, the methods are called when starting and ending the speech playback.

Instance Methods

-vocalizer:didFailWithError:

Called if errors occurred during speech synthesis or playback.

-vocalizer:didReceivePartialSynthesis:

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

-vocalizerDidFinishPlaying:

Called when the embedded player finishes producing audio.

-vocalizerDidStartPlaying:

Called when the embedded player starts producing audio.

-vocalizerDidSynthesisDone:

Called when the server finished speech synthesis.

Method Detail

-vocalizer:didFailWithError:

- (void)vocalizer:(id< YSKVocalizing >)vocalizer
 didFailWithError:(NSError *)error 

Called if errors occurred during speech synthesis or playback.

Possible error codes are listed in YSKErrorCode.
Parameters:
vocalizer

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

error

An error that occurred during speech synthesis or playback.

-vocalizer:didReceivePartialSynthesis:

- (void)vocalizer:(id< YSKVocalizing >)vocalizer
didReceivePartialSynthesis:(YSKSynthesis *)synthesis 

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

This method is called each time a new audio fragment is received.
Parameters:
vocalizer

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

synthesis

Results of speech synthesis.

-vocalizerDidFinishPlaying:

- (void)vocalizerDidFinishPlaying:(id< YSKVocalizing >)vocalizer 

Called when the embedded player finishes producing audio.

Parameters:
vocalizer

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

-vocalizerDidStartPlaying:

- (void)vocalizerDidStartPlaying:(id< YSKVocalizing >)vocalizer 

Called when the embedded player starts producing audio.

Parameters:
vocalizer

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

-vocalizerDidSynthesisDone:

- (void)vocalizerDidSynthesisDone:(id< YSKVocalizing >)vocalizer 

Called when the server finished speech synthesis.

Parameters:
vocalizer

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