Interface EventLogger

ru.yandex.speechkit

public  interface  EventLogger 

Interface for logging events that occur in RecognizerActivity.

Methods

voidreportEvent(@NonNull String eventName)

An event named eventName is handled.

voidreportEvent(@NonNull String eventName, @NonNull Map< String, Object > eventArgs)

An event with the eventName and arguments is handled.

Fields

StringEVENT_BUTTON_BACK_PRESSED

The dialog is closed by the user or automatically.

StringEVENT_BUTTON_CANCEL_PRESSED

The user dialog closes when clicking on the darkened area of the screen or swiping down the dialog.

StringEVENT_BUTTON_READY_PRESSED

Stops an object of the OnlineRecognizer class when the darkened area of the screen is clicked.

StringEVENT_BUTTON_REPEAT_PRESSED

The "Repeat" button is clicked.

StringEVENT_HYPOTHESIS_SELECTED

A hypothesis is selected from the list of recognized hypotheses.

StringEVENT_SCREEN_SHOWN

An event that occurs when opening the RecognizerActivity dialog screen.

StringPARAM_HYPOTHESIS_LIST

Key for the list of recognized hypotheses.

StringPARAM_HYPOTHESIS_SELECTED_INDEX

Key for the index of the selected hypothesis.

StringPARAM_HYPOTHESIS_SELECTED_TEXT

Key for the text of the selected hypothesis.

StringPARAM_SCREEN_NAME

Key for the screen name.

StringPARAM_TEXT

Key for a message about an error that may occur while working with an object of the RecognizerActivity class.

StringRECOGNIZER_DIALOG_ACTIVITY_COLLAPSE

Collapses an object of the RecognizerActivity class.

StringRECOGNIZER_DIALOG_ACTIVITY_CREATE

Creates an object of the RecognizerActivity class.

StringRECOGNIZER_DIALOG_ACTIVITY_DESTROY

Destroys an object of the RecognizerActivity class.

StringSCREEN_NAME_ANALYSING

RecognizerActivity has finished speech recording and is waiting for the recognition result.

StringSCREEN_NAME_CANT_USE_MICROPHONE

Opens the error screen if there is no access to the microphone.

StringSCREEN_NAME_CONNECTION_ERROR

The error screen opens when a network problem occurs.

StringSCREEN_NAME_HYPOTHESES

The hypothesis screen opens.

StringSCREEN_NAME_NO_VOICE_DETECTED

The error screen opens when no speech is detected.

StringSCREEN_NAME_SPEAK

RecognizerActivity is ready to record speech for recognition.

StringSCREEN_NAME_UNKNOWN_ERROR

Opens the error screen when an unknown error occurs.

Method Detail

reportEvent

public void reportEvent (@NonNull String eventName)

An event named eventName is handled.

Parameters:
eventName

Event name.

reportEvent

public void reportEvent (@NonNull String eventName, @NonNull Map< String, Object > eventArgs)

An event with the eventName and arguments is handled.

Parameters:
eventName

Event name.

eventArgs

Dictionary that contains additional arguments.

Field Detail

EVENT_BUTTON_BACK_PRESSED

public EVENT_BUTTON_BACK_PRESSED = "ysk_gui_button_back_pressed"

The dialog is closed by the user or automatically.

EVENT_BUTTON_CANCEL_PRESSED

public EVENT_BUTTON_CANCEL_PRESSED = "ysk_gui_button_cancel_pressed"

The user dialog closes when clicking on the darkened area of the screen or swiping down the dialog.

EVENT_BUTTON_READY_PRESSED

public EVENT_BUTTON_READY_PRESSED = "ysk_gui_button_ready_pressed"

Stops an object of the OnlineRecognizer class when the darkened area of the screen is clicked.

EVENT_BUTTON_REPEAT_PRESSED

public EVENT_BUTTON_REPEAT_PRESSED = "ysk_gui_button_repeat_pressed"

The "Repeat" button is clicked.

EVENT_HYPOTHESIS_SELECTED

public EVENT_HYPOTHESIS_SELECTED = "ysk_gui_hypothesis_selected"

A hypothesis is selected from the list of recognized hypotheses.

EVENT_SCREEN_SHOWN

public EVENT_SCREEN_SHOWN = "ysk_gui_screen_shown"

An event that occurs when opening the RecognizerActivity dialog screen.

PARAM_HYPOTHESIS_LIST

public PARAM_HYPOTHESIS_LIST = "hypothesis_list"

Key for the list of recognized hypotheses.

This value is a key in the dictionary of arguments that the logger gets in the reportEvent(String, Map) method.

PARAM_HYPOTHESIS_SELECTED_INDEX

public PARAM_HYPOTHESIS_SELECTED_INDEX = "hypothesis_index"

Key for the index of the selected hypothesis.

This value is a key in the dictionary of arguments that the logger gets in the reportEvent(String, Map) method.

PARAM_HYPOTHESIS_SELECTED_TEXT

public PARAM_HYPOTHESIS_SELECTED_TEXT = "hypothesis_text"

Key for the text of the selected hypothesis.

This value is a key in the dictionary of arguments that the logger gets in the reportEvent(String, Map) method.

PARAM_SCREEN_NAME

public PARAM_SCREEN_NAME = "screen_name"

Key for the screen name.

This value is a key in the dictionary of arguments that the logger gets in the reportEvent(String, Map) method.

PARAM_TEXT

public PARAM_TEXT = "text"

Key for a message about an error that may occur while working with an object of the RecognizerActivity class.

This value is a key in the dictionary of arguments that the logger gets in the reportEvent(String, Map) method.

RECOGNIZER_DIALOG_ACTIVITY_COLLAPSE

public RECOGNIZER_DIALOG_ACTIVITY_COLLAPSE = "ysk_gui_go_to_background"

Collapses an object of the RecognizerActivity class.

RECOGNIZER_DIALOG_ACTIVITY_CREATE

public RECOGNIZER_DIALOG_ACTIVITY_CREATE = "ysk_gui_create"

Creates an object of the RecognizerActivity class.

RECOGNIZER_DIALOG_ACTIVITY_DESTROY

public RECOGNIZER_DIALOG_ACTIVITY_DESTROY = "ysk_gui_destroy"

Destroys an object of the RecognizerActivity class.

SCREEN_NAME_ANALYSING

public SCREEN_NAME_ANALYSING = "ysk_gui_analyzing"

RecognizerActivity has finished speech recording and is waiting for the recognition result.

SCREEN_NAME_CANT_USE_MICROPHONE

public SCREEN_NAME_CANT_USE_MICROPHONE = "ysk_gui_cant_use_microphone"

Opens the error screen if there is no access to the microphone.

SCREEN_NAME_CONNECTION_ERROR

public SCREEN_NAME_CONNECTION_ERROR = "ysk_gui_connection_error"

The error screen opens when a network problem occurs.

SCREEN_NAME_HYPOTHESES

public SCREEN_NAME_HYPOTHESES = "ysk_gui_fragment_result"

The hypothesis screen opens.

SCREEN_NAME_NO_VOICE_DETECTED

public SCREEN_NAME_NO_VOICE_DETECTED = "ysk_gui_no_voice_detected"

The error screen opens when no speech is detected.

SCREEN_NAME_SPEAK

public SCREEN_NAME_SPEAK = "ysk_gui_speak"

RecognizerActivity is ready to record speech for recognition.

SCREEN_NAME_UNKNOWN_ERROR

public SCREEN_NAME_UNKNOWN_ERROR = "ysk_gui_unknown_error"

Opens the error screen when an unknown error occurs.