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

Make sure voice text the result is a int instead of text

kitkatkitkat Member
edited February 2016 in Archive
I am making a simple application to learn how homey works. I want to know if you can already make Homey know that the response will be a number and not text.

Is this possible ? or do I have to use other solutions ?

Comments

  • When I run a app and kill it this is what i get when i run it again: 

    [Error: already asking]

    But the led already changed (to not listening). The only fix for this is to reboot homey

  • Emile can you confirm you guys are considering to open the speech api a bit more ? 
    Once I used api.ai and they had some functionality that you guys also should have, like what i proposed in this topic

    That way there will be allot more "hits".
    Think of scenarios like:
    - People will say a number
    - People will make a choice out of a list (instead of homey listening to everything, you should make sure it only listens for one of the words in the list)
    - Control time out time for listening 

    I don't know if you guys ever considered to bundle your powers with a company that already specializes in speech like api.ai or others then you guys can focus more on the product and less on speech-problems :) 
    Just a hint i know its not that easy.
  • kitkatkitkat Member
    edited March 2016
    Can someone answer  this ? Because i want to create apps where you can set a temperature but the spoken text is always a string it doesnt export it to a number.

    I read something about that you guys use wit.ai ? they have options to do this right ?
  • parseInt(string) doesn't work?
  • parseInt(string) doesn't work?
    Nope because it expects that a number is in the string like 25 insted of twenty-five.
    So if i say: 
    "Set temperature to twenty-five"
    parsesInt would give back Nan.
    Or else Athom has to find a way to make sure every number will be parsed to a real number like "25" instead of "twenty-five"
  • A response by Athom member would be nice. This is important for app development. And the documentation is already lacking as hell....
  • DaneeDeKruyffDaneeDeKruyff Member
    edited March 2016
    So if I understand you correctly you want the oposite of this: https://github.com/scottbea/spoken-numbers

    Does sound like a very good idea to have such functionality available!

    (Edit, I'm sorry, the forum software keeps fucking up the url, I can't get it ok, guess you'll have to copy paste it to the addressbar)
  • So if I understand you correctly you want the oposite of this: https://github.com/scottbea/spoken-numbers

    Does sound like a very good idea to have such functionality available!

    (Edit, I'm sorry, the forum software keeps fucking up the url, I can't get it ok, guess you'll have to copy paste it to the addressbar)
    Yes exactly but for example go to wit.ai or API.ai. (I read somewhere Athom uses wit) There a developer can create "intent" like for example the developer already expects that the user will say a number and he needs a number in his code to work. That way the spoken text will also search for a number word and write it in a number in the string. We need this functionality really... Or else each application that requires a number will not work. For example user says: "Go to channel four" "Set temp to twenty" "Remember me in five minutes" Everything that has a number in will not work.
  • @emile can you please comment on this?
  • EmileEmile Administrator, Athom
    Homey should already convert spoken numbers to ints. I'll inves
  • RobertRobert Member
    edited March 2016
    Converting spelled out English numbers to ints has already been developed some time ago for Homey, but it has not yet been implemented because I wanted to include number conversion for Dutch in the same update. To make new app development easier we'll make sure to include English number conversion in update 0.8.24. Dutch will follow in a later version, as this is still under development. 

    Example:
    As of V0.8.24 speech.transcript for 
    "set the temperature to twenty-five degrees" 
    will look like this:
    "set the temperature to 25 degrees"
  • Awesome :)! Thanks look forward to it :)
This discussion has been closed.