Class YSKSpeechKit

Singleton class for configuring and controlling the library.

You don't need to explicitly create or destroy objects of the YSKSpeechKit class. To access an object, use the sharedInstance method that creates an object of the YSKSpeechKit class when called for the first time. This object is destroyed when the app closes.

Class Methods

+sharedInstance

Returns a shared object of the YSKSpeechKit class.

Properties

apiKey

The developer's API key provided by Yandex.

deviceId

The device ID that will be used in the recognition request.

dumpPath

Path for dump files during debugging.

eventLogger

External handler for the event log.

locationProvider

Object that gives the library access to geolocation.

logLevel

Logging level.

speechkitVersion

Library version.

uuid

The ID that will be used in the recognition request.

Method Detail

+sharedInstance

+ (instancetype)sharedInstance

Returns a shared object of the YSKSpeechKit class.

Returns:

Shared object of the YSKSpeechKit class.

Property Detail

apiKey

(copy, readwrite) NSString * apiKey

The developer's API key provided by Yandex.

Set the property value before using any of the library functionality (for example, before creating an object of the YSKPhraseSpotter class). The API key is verified when working with the server; the verification may fail with the YSKErrorInvalidApiKey error. Possible error codes are listed in YSKErrorCode.

deviceId

(copy, readwrite) NSString * deviceId

The device ID that will be used in the recognition request.

The ID must be the same for all requests from a particular app on a particular device.

dumpPath

(copy, readwrite) NSString * dumpPath

Path for dump files during debugging.

eventLogger

(strong, readwrite) id< YSKEventLogger > eventLogger

External handler for the event log.

locationProvider

(strong, readwrite) id< YSKLocationProvider > 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.
Note.
You can disable geolocation using one of these methods:
  • By not passing the property value

  • By setting an empty value for the property

logLevel

(assign, readwrite) YSKLogLevel logLevel

Logging level.

speechkitVersion

(copy, readonly) NSString * speechkitVersion

Library version.

uuid

(copy, readwrite) NSString * uuid

The ID that will be used in the recognition request.

Unique ID of the app or service user. The value of this field is passed in every request to SpeechKit. Used for tracking sessions of individual users and apps. The value should be generated the first time the app is launched on the device and stored in permanent storage. Subsequent runs of the app should use the saved value.