Author Topic: 2nd Genaration HAL - Android Only Voice Recognition for Vera  (Read 9279 times)

RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 5236
  • Karma: +421/-41
    • RTS Services Plugins
2nd Genaration HAL - Android Only Voice Recognition for Vera
« on: April 26, 2013, 07:56:40 am »
This is the 2nd Generation of HAL ... The Home Automation using Language App.
This version is an Android only app.
You can find a YouTube video at: http://www.youtube.com/watch?v=_PVHOWRUGlA

You can find it on the Google Play store using the keywords: HAL and Vera

HAL uses the Google Voice Recognition Service for translating your request. The reliability of the interpretation is enhanced using the following techniques:
  • Fuzzy Logic - This will match similarly pronounced and spelled words ... Easily handles the difference between light and lights.
  • Semantic Rules - For each command type ... the order of the recognized parts is important. But you can include other words ... to be spoken more naturally.
    i.e. the minimum to turn on a light called Office Light   is: On Office Light
    But you can also say:  "Computer turn on the office lights please"
  • A dictionary for words that Google continues to misinterpret.
    i.e.     lite for light  that's a little to different for the fuzzy logic to handle.
HAL supports commands for all of the following Device Types:
  • Combination Switch   (Trigger)
  • Dimmable Switch (On, Off, Toggle, Set, Change, Increase, Raise, Decrease, Lower, Raise by, lower by)
  • Humidity Sensor  (Status)
  • Light Sensor (Status)
  • Locks (Status, Lock, Unlock)
  • Program Logic Timer Switch (Status, On, Off, Toggle, Arm, Bypass)
  • Security Sensor (Status, Arm, Bypass)
  • Switch (Status, On, Off, Toggle)
  • Temperature Sensor (Status)
  • Thermostat   (Set-points, Mode, Fan Mode, Energy Mode)
  • Virtual Switch (Status, On, Off, Toggle)
  • Wall Coverings (Status, Open, Close, Up, Down, Stop)

HAL will work on your LAN, remotely through the MCV servers, or remotely through your SSH or VPN tunnels. It will auto-detect the best option.

Hal also supports a request for the Active Status ... HAL will tell you the devices that are considered to be active.

HAL was designed to be localized.  (Made available in a future release.)
The response to a Status command can be  customized. (Made available in future release.)
What is considered active (Boolean logic, using the device's properties can be customized. Made available in a future release.)
HAL was defined to be customized ... change the semantic rules to match your style of speech (Made available in future release.)
HAL was designed so that I can easily extend it to additional device types: (New Devices and Commands Made available in a future release.)
To extend I only need the Device Type, Semantic rules (if not the same as an existing class of devices) and the corresponding device actions.

hek

  • Hero Member
  • *****
  • Posts: 684
  • Karma: +55/-0
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #1 on: April 26, 2013, 08:07:28 am »
Cool Richard,

I am about to put up a couple of android tablets on the walls here for status and voice recognition. I was actually investigating the new Google Voice APIs. Would like to have some kind of continuous voice recognition if possible. 
How does your app handle this?
Is it possible to have it running it in the background (and view other status stuff on the screen)?

I would gladly help translating to Swedish.



RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 5236
  • Karma: +421/-41
    • RTS Services Plugins
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #2 on: April 26, 2013, 08:22:47 am »
That's on my list .. my first Gen had an Open Mike
I think I can do this with Google ...

If I get the Open Mike to work I will also allow it to be run in the background.

Cor

  • Hero Member
  • *****
  • Posts: 622
  • Karma: +3/-0
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #3 on: April 27, 2013, 01:41:28 am »
I just installed this app , very nice idea. But in won't handle my dutch accent :-s. I did about 20-ish test, one went through , but only after I changed a light name (from frontdoor to test), that was the only time I succeeded :-(

"turn on frontdoor light"  is recognised as "old florida outdoor life", "old for you life", "doodle form store life" 

I know I have a very strong accent , but there is a difference between light and life :-)

Is there a way to "teach" HAL specific words ?

Thanks,
Cor

RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 5236
  • Karma: +421/-41
    • RTS Services Plugins
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #4 on: April 27, 2013, 04:10:26 am »
Yes ... there is a Dictionary page ... where you can enter what Google heard Source to what you said Target.

Does Google Voice Recognition work for you in Dutch for other things ? Google Search ? Google Maps ? .... Do you have to specify another Language ?

I have designed Hal to change the Semantic rules to other languages (localize it) as well as the User Interface ... but I do not have a feeling for how good Google is at voice recognition in other languages.

I will be looking for people to work with to assist me in the localization effort for different languages.

Cor

  • Hero Member
  • *****
  • Posts: 622
  • Karma: +3/-0
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #5 on: April 27, 2013, 10:28:39 pm »
I found the dictionary page, but have no clue what to do with it.
I can add something, i can type in a source andi can type in a target. There is no accept or so button and the programm doesnt' respond anymore, unless i remove what I typed.

Is it possible that the dictionary is in the wrong language?  My phone is bought in Germany, with a german simcard, but native language is dutch, and I prefer to speak english. Can i check/change the google input language somewhere?

Thanks,
Cor


RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 5236
  • Karma: +421/-41
    • RTS Services Plugins
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #6 on: April 28, 2013, 06:20:18 am »
Quote
There is no accept or so button

There's a release in the pipeline to fix that ... It was a layout problem on my part ... I did not setup the popup correctly and on some phones the button bar is not displayed.

Quote
can i check/change the google input language somewhere?
When you get to the Google Window where it is listening for you to speak ... there is a Wrench icon on the upper right corner. It has options to change language ... but I have no idea if Google Voice recognition actually works well in other languages.

Cor

  • Hero Member
  • *****
  • Posts: 622
  • Karma: +3/-0
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #7 on: April 29, 2013, 03:02:45 am »
@RichardTSchaefer:  I see a grey line below the input tables.....that must be the button,when I press it , I see there is now a target and source with the words I typed.

My phone updated just now and after the update , the app does not want to start anymore, I get the message "......unfortunately" stopped... , the report has been send.

Comming back to the  dictionary, I am not sure how it works, obviously I pronounce a word not 
"typically english"   hence it doesn't recognize it. How does typing a source and target word help?   I expect I have to say the word , it is somehow recorded and I have to assign a target to it , or not?

Changing the dicationary of google (wrench right upper corner")  doesn't work in galaxy S3 , no wrench in upper right corner. But I see somewhere written  " .....Uk english", So I expect it is set correctly, since I want my commands in english.
I am looking forward to have this app fully working :-)

Thanks,
Cor


RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 5236
  • Karma: +421/-41
    • RTS Services Plugins
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #8 on: April 29, 2013, 03:49:05 am »
If i say light ... Google thinks I said lite.
So I add a word to the dictionary:

Google Translation (Used to be source):   Lite
What I said (Used to be target): Light

Then when I see the word lite in the translation from Google ... I replace it with light ... then I attempt to parse the message.

There should be a HAL directory on your SDCard.
Can you send me the file Dictionary.csv located there.
Then delete it and see if HAL will start.
 

Cor

  • Hero Member
  • *****
  • Posts: 622
  • Karma: +3/-0
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #9 on: April 29, 2013, 08:30:41 am »
I saw the error in the csv file , there was a comma on one line, I must have pushed the button (which wasn't there :-) ) .

I seem to get somewhere now, I am able to activate scenes ... and that's cool !!! :-)
But switching/turning on/off fibaro relais and wallplugs doens't workfor me yet.

What is the correct wording for turning on and of a fibaro relais and wallplugs. For example , I have a fibaro relais called "front door light" , I tried "turn on front door light", "switch on front door light"  but those doesn't work.

Thanks for all the help,
Cor

RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 5236
  • Karma: +421/-41
    • RTS Services Plugins
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #10 on: April 29, 2013, 10:24:02 am »
If they look like binary switches on Vera ... then the simplest commands are:

CMD SWITCH-NAME
or
SWITCH-NAME CMD

Where CMD is one of Status, On, Off, Toggle

Check the Help Menu ... to see which devices it found.

Please send me the csv file ... I need to see what you did to make it bullet proof. If you did it .. some one else will also!

hek

  • Hero Member
  • *****
  • Posts: 684
  • Karma: +55/-0
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #11 on: April 29, 2013, 11:02:03 am »
Some encoding problem with Swedish characters. Is UTF-8 used?

 

Cor

  • Hero Member
  • *****
  • Posts: 622
  • Karma: +3/-0
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #12 on: April 29, 2013, 12:14:00 pm »
@ RichardTSchaefer:

Attached the csv-file , the error I think happened when the "ok,cancel,delete" button was not shown.

HAL still has some issues recognizing words , although the dictionary  get some errors out , one of the problems is 1 word and google recognizes it as 2 words, this can not be inserted in the dictionary. For example when I say "increase" google keeps on recognising as "in case" this cannot be changed/inserted in the dictionary....  any way around it? (don't wanna go back to school again :-) )

*edit ,I cannot upload a csv file :-s I uploaded now screenshot of it.

Will there be a possibility to have HAL active on the background and without touching the device issuing commands?

Cor

RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 5236
  • Karma: +421/-41
    • RTS Services Plugins
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #13 on: April 29, 2013, 02:26:44 pm »
Yes, I plan to do the Open Mike ... I had that in my previous version ... before using Google Voice Recognition ...

S-F

  • Hero Member
  • *****
  • Posts: 1184
  • Karma: +57/-8
  • Clueless N00b
Re: 2nd Genaration HAL - Android Only Voice Recognition for Vera
« Reply #14 on: April 30, 2013, 01:31:04 pm »
I can't for the life of me get HAL to control my thermostat. It can tell me the status of the thermostat but not change it's settings. If I say "Set the thermostat to XX" I get an error message even though my speech was detected properly. What is the proper diction to control a thermostat? The wording in the help file wasn't entirely helpful on this point.

For the record, I have the exact same issue with AutHomation. I should probably bring that up in the appropriate location though.
My forum account was apparently hacked by a leprechaun. And he's drunk all of the time. If a post of mine seems a little off kilter, it's probably because he made it.