Description

An NLP model used to detect keywords in the transcript of the input audio. For example, you can have keyword detection which will trigger every time the word "red" is said, and another trigger for the word "yellow".

Example

var options = VoiceML.ListeningOptions.create();

var nlpKeywordModel = VoiceML.NlpKeywordModelOptions.create();
nlpKeywordModel.addKeywordGroup("Fruit", ["orange", "apple"]);
nlpKeywordModel.addKeywordGroup("Vegetable", ["carrot", "tomato"]);

options.nlpModels = [ nlpKeywordModel ];
interface KeywordModelGroup {
    keywords: string[];
    name: string;
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

keywords: string[]

Description

Array of keywords that are being sent to the ML model for detection with similar meaning. For example, putting the word "yellow" would trigger a response in the sentence "I saw a yellow bird". The keyword detection model supports slight variation in the word transcription. We recommend adding possible synonyms of the same keyword. So for example, should you want to detect "movie", you might want to consider adding "video" and possibly "feature" and "flick" as well to the list resulting in ["movie", "video", "feature","flick"] as different people might express themselves differently.

name: string

Description

Name of the keyword group.

Methods

  • 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