Initializer class

ru.yandex.speechkit

public class Initializer 

Interface for a single-use initializer.

Initialization is an internal process for initializing internal SpeechKit mechanisms. Initialization may require executing lengthy read operations from permanent memory or network access, and generally takes a significant amount of time. This is why a special mechanism has been introduced for performing initialization when it is convenient for the user.

In the current implementation, initialization sends a request to the server and gets a response with a set of parameters and configurations (for example, the confidence thresholds), which are then used during speech recognition.

The initializer is designed to carry out a single startup and may not be reused.

The Initializer object controls the initialization process. In the current implementation, this means controlling the network connections.

Note.

SpeechKit must be initialized using SpeechKit.configure() before you can create Initializer objects.

Methods

Initializercreate(InitializerListener listener)

Creates a single-use initializer

voidfinalize()
booleanisInitializationCompleted()

Checks whether initialization has already been performed.

voidstart()

Starts the initialization process.

Method descriptions

create

public static Initializer create (InitializerListener listener)

Creates a single-use initializer

To start the initialization process, call the start() method.
Parameters:
listener

Listener for notification about the progress of initialization. Receives notifications about the beginning and end of initialization.

Returns:

The created initializer.

finalize

protected void finalize ()

isInitializationCompleted

public static boolean isInitializationCompleted ()

Checks whether initialization has already been performed.

Returns:

true - performed, false - not performed.

start

public void start ()

Starts the initialization process.