diff --git a/animals.txt b/animals.txt index ae2accf..f76c497 100644 --- a/animals.txt +++ b/animals.txt @@ -1 +1,10 @@ -# to do ... +capibara +kameel +kikker +konijn +olifant +ooievaar +panda +salamander +struisvogel +wolf \ No newline at end of file diff --git a/script/resultHandling.js b/script/resultHandling.js index c9a6a8b..73ffea8 100644 --- a/script/resultHandling.js +++ b/script/resultHandling.js @@ -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', @@ -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)); \ No newline at end of file