Protocol YSKRecognizing

The protocol describes the interface of the object that recognizes speech.

Instance Methods

-cancel

Cancels the recognition request.

-prepare

Prepares an object of the class that implements the YSKRecognizing protocol for speech synthesis.

-startRecording

Starts the recognition process.

-stopRecording

Aborts audio recording.

Properties

audioSource

A source that passes an audio for recognition to an object of the YSKRecognizing class that implements the protocol.

delegate

Delegate for notification about the progress of speech recognition.

Method Detail

-cancel

- (void)cancel

Cancels the recognition request.

This method cancels the recognition request at any stage of the operation. Audio stops being recorded, and the network connection is terminated if necessary. The method cancels the request synchronously, after calling it, the YSKRecognizerDelegate methods are no longer called.Asynchronous execution.

-prepare

- (void)prepare

Prepares an object of the class that implements the YSKRecognizing protocol for speech synthesis.

Makes preparation for speech recognition in advance. If the method is not called explicitly, it is called automatically in the startRecording method. Asynchronous execution.
Note.

It is recommended to call this method before starting the class object that implements the YSKRecognizing protocol.

-startRecording

- (void)startRecording

Starts the recognition process.

The method can be called multiple times for the same object of the class. The method runs asynchronously; when recording starts, the recognizerDidStartRecording: callback method is called.

-stopRecording

- (void)stopRecording

Aborts audio recording.

The method does not cancel recognition; it continues until all results are received. In most cases, this method does not need to be called, since the Voice Activity Detector (VAD) automatically detects the end of speech. However, the method may be useful when the VAD is disabled or incorrectly detects the end of speech.

Property Detail

audioSource

(strong, readonly) id< YSKAudioSource > audioSource

A source that passes an audio for recognition to an object of the YSKRecognizing class that implements the protocol.

If an audio source receives data from the standard device input, to enable it, correctly configure an audio session.

delegate

(weak, readwrite) id< YSKRecognizerDelegate > delegate

Delegate for notification about the progress of speech recognition.