diff --git a/examples/annyang-example.js b/examples/annyang-example.js index 6a1dbbf..3d51d6a 100644 --- a/examples/annyang-example.js +++ b/examples/annyang-example.js @@ -10,7 +10,7 @@ const client = new speech.SpeechClient({ const hotwords = [{ file: ROOT_DIR + 'resources/sonus.pmdl', hotword: 'sonus' }] const language = "en-US" -const sonus = Sonus.init({ hotwords, language }, client) +const sonus = Sonus.init({ hotwords, language: language }, client) const commands = { 'hello': function () { @@ -36,4 +36,4 @@ sonus.on('final-result', result => { if (result.includes("stop")) { Sonus.stop() } -}) \ No newline at end of file +}) diff --git a/examples/example.js b/examples/example.js index 960b6e6..bfa3fae 100644 --- a/examples/example.js +++ b/examples/example.js @@ -12,7 +12,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" }, client) +const sonus = Sonus.init({ hotwords, language: language, recordProgram: "rec" }, client) Sonus.start(sonus) console.log('Say "' + hotwords[0].hotword + '"...') diff --git a/examples/trigger-example.js b/examples/trigger-example.js index fe6abc2..eab2a30 100644 --- a/examples/trigger-example.js +++ b/examples/trigger-example.js @@ -10,7 +10,7 @@ const client = new speech.SpeechClient({ const hotwords = [{ file: ROOT_DIR + 'resources/sonus.pmdl', hotword: 'sonus' }] const language = "en-US" -const sonus = Sonus.init({ hotwords, language }, client) +const sonus = Sonus.init({ hotwords, language: language }, client) try{ Sonus.trigger(sonus, 1) @@ -40,4 +40,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")