Lens Studio v4.4+
Inherits from ScriptObject
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”.
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 of the keyword group.
Returns the name of this object’s type.
isOfType(String type) :
Returns true if the object matches or derives from the passed in type.
isSame(ScriptObject other) :
Returns true if this object is the same as
other. Useful for checking if two references point to the same thing.
options = VoiceML.ListeningOptions.create(); nlpKeywordModel = VoiceML.NlpKeywordModelOptions.create(); nlpKeywordModel.addKeywordGroup("Fruit", ["orange", "apple"]); nlpKeywordModel.addKeywordGroup("Vegetable", ["carrot", "tomato"]); options.nlpModels = [ nlpKeywordModel ];
Still Looking for help?Visit Support