From 6136336becd097186a6b555688c7704ad947221a Mon Sep 17 00:00:00 2001 From: Benjamin Ver Date: Fri, 25 Sep 2020 10:33:29 +0200 Subject: [PATCH] added small list of animals --- animals.txt | 11 ++++++++++- script/resultHandling.js | 8 +++++--- 2 files changed, 15 insertions(+), 4 deletions(-) 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