Operations Summary: | |
void | initWithResultAndId(in Result source, in long id) |
void | initWithState(in Result source, in long id, in boolean isTokenFinalized, in boolean isUnfinalizedTokensChanged) |
boolean | isTokenFinalized() |
boolean | isUnfinalizedTokensChanged() |
Operations Inherited from SpeechEvent | |
init, initWithId, getId, getSource, paramString, toString |
Operations Inherited from Bonobo::Unknown | |
ref, unref, queryInterface |
Operation Details: |
Initializes a ResultEvent
with an event type
identifier. The isTokenFinalized
and
isUnfinalizedTokensChanged
flags are set to false.
Initializes a ResultEvent
for a specified source
Result
and result event id. The two boolean flags
indicating change in tokens should be set appropriately for
RESULT_CREATED
, RESULT_UPDATED
,
RESULT_ACCEPTED
and RESULT_REJECTED
events. (For other event types these flags should be false).
Result
object that issued the event.RESULT_CREATED
GRAMMAR_FINALIZED
RESULT_UPDATED
RESULT_ACCEPTED
RESULT_REJECTED
AUDIO_RELEASED
TRAINING_INFO_RELEASED
For RESULT_CREATED
, RESULT_UPDATED
,
RESULT_ACCEPTED
and RESULT_REJECTED
events returns true if any tokens were finalized.
For other events, return false. If true, the number of tokens
returned by numTokens
and getBestTokens
has increased.
Result#numTokens
Result#getBestTokens
For RESULT_CREATED
, RESULT_UPDATED
,
RESULT_ACCEPTED
and RESULT_REJECTED
events returns true if the unfinalized tokens changed. For
other events, return false. If true, the value returned by
getUnfinalizedTokens
has changed.
Note that both RESULT_ACCEPTED
and
RESULT_REJECTED
events implicitly set the
unfinalized text to null. The
isUnfinalizedTokensChanged
method should return
true only if the unfinalized text was non-null prior to
finalization.
Result#getUnfinalizedTokens