Skip to content

Commit

Permalink
Merge pull request #91 from talsalmona/patch-1
Browse files Browse the repository at this point in the history
Fixed usage of language
  • Loading branch information
evancohen authored Jan 9, 2019
2 parents 5a5fec1 + 83cb06d commit b7619bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/annyang-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -36,4 +36,4 @@ sonus.on('final-result', result => {
if (result.includes("stop")) {
Sonus.stop()
}
})
})
2 changes: 1 addition & 1 deletion examples/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '"...')
Expand Down
4 changes: 2 additions & 2 deletions examples/trigger-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -40,4 +40,4 @@ try{
}

//Will use index 0 with a hotword of "triggered" and start streaming immedietly
Sonus.trigger(sonus, 0, "some hotword")
Sonus.trigger(sonus, 0, "some hotword")

0 comments on commit b7619bc

Please sign in to comment.