Skip to content

Commit

Permalink
added small list of animals
Browse files Browse the repository at this point in the history
  • Loading branch information
wasnoplus committed Sep 25, 2020
1 parent 1f65982 commit 6136336
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 10 additions & 1 deletion animals.txt
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# to do ...
capibara
kameel
kikker
konijn
olifant
ooievaar
panda
salamander
struisvogel
wolf
8 changes: 5 additions & 3 deletions script/resultHandling.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// todo script/VoskJS.js inladen

const allWords = ['volgende', 'vorige']
const langModel = "model-nl.tar.gz";
const allWords = ['volgende', 'vorige'];
const callbacks = [];
const eventWordMap = {
'vorige': 'navigate-backward',
Expand Down Expand Up @@ -41,10 +43,10 @@ function sendCommand(w, c) {
}
}

thisRec = new VoskJS.Recognizer("model-nl.tar.gz")
thisRec = new VoskJS.Recognizer(langModel);
thisRec.onresult = result => {
if (result.result) {
handleResult(result, sendCommand)
handleResult(result, sendCommand);
}
}
thisRec.getActive().then(active => thisRec.setActive(!active));

0 comments on commit 6136336

Please sign in to comment.