Skip to content

Instantly share code, notes, and snippets.

@ObjectIsAdvantag
Last active July 10, 2016 12:11
Show Gist options
  • Save ObjectIsAdvantag/66fee8146b36f52b2806339f7173a85e to your computer and use it in GitHub Desktop.
Save ObjectIsAdvantag/66fee8146b36f52b2806339f7173a85e to your computer and use it in GitHub Desktop.
wait(1000);
say("Welcome to the alphabet recognizer");
wait(1000);
ask("Please spell your word, and press # when done", {
choices:"https://gist.githubusercontent.com/ObjectIsAdvantag/fdd65dcff2b6518fa741130b36060870/raw/mygrammar.xml",
terminator:"#",
attempts:3,
bargein:false,
timeout:5,
minConfidence:0.5,
sensitivity:0.5,
mode:"any",
onChoice: function(event) {
say("You said: " + event.value);
},
onBadChoice: function(event) {
say("Sorry I did not understand what you said");
},
onTimeout: function(event) {
say("Sorry I did not hear what you said");
}
});
wait(500);
say("Bye Bye");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment