-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
21 lines (21 loc) · 820 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if (annyang) {
// Let's define a command.
var commands = {
'home': function(){window.location.href = "./index.html"},
'notes': function() {window.location.href = "./voiceNotes/voiceNotes.html"},
'news': function() {document.getElementById("news").click()},
'songs': function() {window.location.href = "./music/musicindex.html"},
'darshan': function() { window.location.href = "./darshan/darshan.html" },
// 'login': function(){window.location.href = "./login"}
//console.log("in");
};
// This should be true
console.log(annyang.isListening())
// Add our commands to annyang
annyang.addCommands(commands);
// Start listening.
annyang.start();
annyang.addCallback('soundstart', function() {
console.log('sound detected');
});
}