Preparing search index...

    Class ListeningUpdateEventArgs

    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.

    VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.

    //@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);

    Hierarchy (View Summary)

    Index

    Properties

    isFinalTranscription: boolean

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

    Lens Scripting Version 153

    transcription: string

    Returns the transcription from the Automatic Speech Recognition.

    Lens Scripting Version 153

    Methods

    • In case enableSystemCommands() function used, returns the command executed by the system.

      Returns NlpCommandResponse[]

      Lens Scripting Version 158

    • In case an NLP intent model used, returns intent response from the ML engine.

      Returns NlpIntentResponse[]

      Lens Scripting Version 153

    • In case a keyword detection model used, returns results from the keywords model.

      Returns NlpKeywordResponse[]

      Lens Scripting Version 153

    • 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 QnaResponse[]

      Lens Scripting Version 182

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

      Parameters

      • type: string

      Returns boolean

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

      Parameters

      Returns boolean