YSKVocalizer class

#import <YSKVocalizer.h>

Class for single sessions of speech synthesis.

YSKVocalizer is responsible for sending text to the server and vocalizing synthesized speech. For event notification, YSKVocalizer uses YSKVocalizerDelegate.

Instance methods

-cancel

Cancels the speech synthesis process. It also interrupts vocalization of synthesized speech if autoPlay is set to true.

-initWithText:language:

Creates a single-use object that performs vocalization of the text in the specified language.

-initWithText:language:autoPlay:

Creates a single-use object that performs vocalization of the text in the specified language.

-initWithText:language:autoPlay:voice:

Creates a single-use object that vocalizes the text in the specified language, with the specified voice.

-play

Starts playback of synthesized speech if autoPlay is set to false.

-start

Launches the speech synthesis process.

Properties

delegate

Delegate for tracking speech synthesis events.

text

The text to vocalize.

Method descriptions

-cancel

- (void) cancel

Cancels the speech synthesis process. It also interrupts vocalization of synthesized speech if autoPlay is set to true.

-initWithText:language:

- (id) initWithText:(NSString *) text
language:(NSString *) language

Creates a single-use object that performs vocalization of the text in the specified language.

Parameters:
language

The recognition language in BCP 47 format. In BCP 47 format, the language is indicated using the language code in ISO 639 format, followed by a dash (-), followed by the country code in ISO 3166-1 format.

text

The text to convert to speech.

Returns:

Instance of the YSKVocalizer class for vocalizing text with the specified parameters.

-initWithText:language:autoPlay:

- (id) initWithText:(NSString *) text
language:(NSString *) language
autoPlay:(BOOL) autoPlay

Creates a single-use object that performs vocalization of the text in the specified language.

Parameters:
language

The recognition language in BCP 47 format.

text

The text to convert to speech.

Returns:

Instance of the YSKVocalizer class for vocalizing text with the specified parameters.

-initWithText:language:autoPlay:voice:

- (id) initWithText:(NSString *) text
language:(NSString *) language
autoPlay:(BOOL) autoPlay
voice:(NSString *) voice

Creates a single-use object that vocalizes the text in the specified language, with the specified voice.

Parameters:
language

The recognition language in BCP 47 format.

text

The text to convert to speech.

Returns:

Instance of the YSKVocalizer class for vocalizing text with the specified parameters.

-play

- (void) play

Starts playback of synthesized speech if autoPlay is set to false.

-start

- (void) start

Launches the speech synthesis process.

Property descriptions

delegate

(assign, readwrite) id< YSKVocalizerDelegate > delegate

Delegate for tracking speech synthesis events.

text

(retain, readwrite) NSString * text

The text to vocalize.