From 1038b0d3df30d4b3675d6f096077fffb35523138 Mon Sep 17 00:00:00 2001 From: Tal Salmona <222969+talsalmona@users.noreply.github.com> Date: Mon, 10 Dec 2018 07:54:18 +0200 Subject: [PATCH 1/3] Fixed usage of language with this change, english is always used --- examples/example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example.js b/examples/example.js index e6ea1af..2182115 100644 --- a/examples/example.js +++ b/examples/example.js @@ -11,7 +11,7 @@ const hotwords = [{ file: ROOT_DIR + 'resources/sonus.pmdl', hotword: 'sonus' }] const language = "en-US" //recordProgram can also be 'arecord' which works much better on the Pi and low power devices -const sonus = Sonus.init({ hotwords, language, recordProgram: "rec" }, speech) +const sonus = Sonus.init({ hotwords, language: language, recordProgram: "rec" }, speech) Sonus.start(sonus) console.log('Say "' + hotwords[0].hotword + '"...') From 2fd76f2d7a5f1068938b20c41e4405aba1295146 Mon Sep 17 00:00:00 2001 From: Tal Salmona <222969+talsalmona@users.noreply.github.com> Date: Mon, 10 Dec 2018 07:56:31 +0200 Subject: [PATCH 2/3] Update annyang-example.js --- examples/annyang-example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/annyang-example.js b/examples/annyang-example.js index bccaba0..9467cb9 100644 --- a/examples/annyang-example.js +++ b/examples/annyang-example.js @@ -9,7 +9,7 @@ const speech = require('@google-cloud/speech')({ const hotwords = [{ file: ROOT_DIR + 'resources/sonus.pmdl', hotword: 'sonus' }] const language = "en-US" -const sonus = Sonus.init({ hotwords, language }, speech) +const sonus = Sonus.init({ hotwords, language: language }, speech) const commands = { 'hello': function () { @@ -35,4 +35,4 @@ sonus.on('final-result', result => { if (result.includes("stop")) { Sonus.stop() } -}) \ No newline at end of file +}) From bb6c3e9ba0ecfb8e7ee629251b908559f63aca04 Mon Sep 17 00:00:00 2001 From: Tal Salmona <222969+talsalmona@users.noreply.github.com> Date: Mon, 10 Dec 2018 07:56:52 +0200 Subject: [PATCH 3/3] Update trigger-example.js --- examples/trigger-example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/trigger-example.js b/examples/trigger-example.js index 077f78c..e8b9ef9 100644 --- a/examples/trigger-example.js +++ b/examples/trigger-example.js @@ -9,7 +9,7 @@ const speech = require('@google-cloud/speech')({ const hotwords = [{ file: ROOT_DIR + 'resources/sonus.pmdl', hotword: 'sonus' }] const language = "en-US" -const sonus = Sonus.init({ hotwords, language }, speech) +const sonus = Sonus.init({ hotwords, language: language }, speech) try{ Sonus.trigger(sonus, 1) @@ -39,4 +39,4 @@ try{ } //Will use index 0 with a hotword of "triggered" and start streaming immedietly -Sonus.trigger(sonus, 0, "some hotword") \ No newline at end of file +Sonus.trigger(sonus, 0, "some hotword")