YSKSpeechKit class

#import <YSKSpeechKit.h>

Singleton class aimed at setting up and controlling overall SpeechKit operation.

SpeechKit objects do not need to be created or destroyed explicitly. To access an object, use the sharedInstance method, which creates a YSKSpeechKit object when called for the first time. This object is destroyed when the app closes.

Instance methods

-configureWithAPIKey:

Configuring SpeechKit.

-configureWithAPIKey:andLocationProvider:

Configuring SpeechKit (with access to geolocation).

-getParameterValue:

Returns the values of internal SpeechKit library parameters set by the user.

-setParameter:withValue:

Sets internal SpeechKit library parameters.

Class methods

+sharedInstance

Returns a shared instance of the YSKSpeechKit class.

+speechkitVersion

Returns the SpeechKit version.

Method descriptions

-configureWithAPIKey:

- (void) configureWithAPIKey:(NSString *) apiKey

Configuring SpeechKit.

The method should be called before beginning to use any SpeechKit functionality (for example, before creating instances of YSKRecognizer).
Parameters:
apiKey

The API key provided by Yandex.

Note.

The API key is verified when working with the server (such as during initialization). The key validation process may finish with the error kYSKErrorAPIKey.

-configureWithAPIKey:andLocationProvider:

- (void) configureWithAPIKey:(NSString *) apiKey
andLocationProvider:(id< YSKLocationProvider >) locationProvider

Configuring SpeechKit (with access to geolocation).

The method should be called before beginning to use any SpeechKit functionality (for example, before creating instances of YSKRecognizer).
Parameters:
apiKey

The API key provided by Yandex.

locationProvider

Object that gives the library access to geolocation. Information about the user's current location may be used for determining the most likely hypotheses, for example, when using the maps language model.

To disable geolocation, pass an empty attribute as the second parameter.
Note.

The API key is verified when working with the server (such as during initialization). The key validation process may finish with the error kYSKErrorAPIKey.

Note.

If SpeechKit was configured using a different version of configureWithAPIKey:, the default value will be used for working with geolocation.

-getParameterValue:

- (NSString *) getParameterValue:(NSString *) name

Returns the values of internal SpeechKit library parameters set by the user.

-setParameter:withValue:

- (void) setParameter:(NSString *) name
withValue:(NSString *) value

Sets internal SpeechKit library parameters.

+sharedInstance

+ (instancetype) sharedInstance

Returns a shared instance of the YSKSpeechKit class.

Returns:

A shared instance of the YSKSpeechKit class.

+speechkitVersion

+ (NSString *) speechkitVersion

Returns the SpeechKit version.

Returns:

String representation of the SpeechKit version number.