Description

The parameter when the callback registered on from VoiceMLModule.onListeningUpdate is called. This is to mark the input audio transcription (and possibly NlpModels as a result) was updated.

Example

//@input Asset.VoiceMLModule vmlModule
//@input Component.Text screenTextTranscription

var onUpdateListeningEventHandler = function(eventArgs){
var keywordResponses = eventArgs.getKeywordResponses();
var intentResponses = eventArgs.getIntentResponses();
var commandResponses = eventArgs.getCommandResponses();

if(eventArgs.isFinalTranscription || eventArgs.transcription.trim() != ""){
script.screenTextTranscription.text = eventArgs.transcription;
}
}

script.vmlModule.onListeningUpdate.add(onUpdateListeningEventHandler);
interface ListeningUpdateEventArgs {
    isFinalTranscription: boolean;
    transcription: string;
    getCommandResponses(): NlpCommandResponse[];
    getIntentResponses(): NlpIntentResponse[];
    getKeywordResponses(): NlpKeywordResponse[];
    getQnaResponses(): QnaResponse[];
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

isFinalTranscription: boolean

Description

Specifies whether the transcription returned is final, or partial (interim) which can be updated later as the sentence continues.

transcription: string

Description

Returns the transcription from the Automatic Speech Recognition.

Methods

  • Returns QnaResponse[]

    Description

    Returns an array of QnaResponse elements, each representing an answer to the question in the eventArgs.transcript. It has properties answer(a string with the ML's response) and answerStatusCode, which can take values

  • Returns string

    Description

    Returns the name of this object's type.

  • Parameters

    • type: string

    Returns boolean

    Description

    Returns true if the object matches or derives from the passed in type.

  • Parameters

    Returns boolean

    Description

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Generated using TypeDoc