This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed

Help with speech needed

Hi all,

I've been trying to implement some speech recognition function for an app (the trash collection app) but can't get it to work. Can anyone help me?

In the app.json I have:
"speech":[
{
"id": "trash_collected",
"importance": 0.7,
"triggers" : {
"en" : ["collected", "trash", "container"],
"nl" : ["opgehaald", "container", "afvalbak", "vuilnisbak"]
}
}
],
in the app.js I use
Homey.manager('speech-input').on('speech', parseSpeach);
and 
function parseSpeach (speech, callback) {
  Homey.log('parseSpeach()', speech);
  console.log(speech);
  speech.triggers.some(function (trigger) {
    switch (trigger.id) {
      case 'trash_collected' :
return true;
        }
});
  callback(null, true);
}

I stole it from the Kodi app, but I don't see anything logged in the console when debugging the app. I tried speaking to Homey and enter it manually in the /manager/speech-input/. Both with no result.

What I expect is that when I use the word collected, trash or container that the function is triggered. Anyone any idea, suggestion?

Comments

This discussion has been closed.