Author Topic: Siri like functionality i.e. ask your computer any question  (Read 19352 times)

0 Members and 1 Guest are viewing this topic.

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
Re: Siri like functionality i.e. ask your computer any question
« Reply #45 on: February 02, 2014, 03:39:12 PM »
Hi,

I got Jb's script going. Please take a look at the voxLog.txt file. I asked, "who is Winston Churchill?" and the TTS result is: "London, Greater London, United Kingdom."

However, here is the log:

[action] TTS.Speak:full name | Winston Leonard Spencer-Churchill date of birth | Monday, November 30, 1874 (139 years ago) place of birth | Woodstock, Oxfordshire, United Kingdom date of death | Sunday, January 24, 1965 (age: 90 years) (49 years ago) place of death | London, Greater London, United Kingdom

It seems to only speak the last part of the text.

Edit: I did it again and this time it spoke "full name" and that was it. lol Seems to read the beginning or end. No idea how this works.

Thanks for looking.
« Last Edit: February 02, 2014, 03:45:11 PM by Brian »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Siri like functionality i.e. ask your computer any question
« Reply #46 on: February 02, 2014, 04:00:37 PM »
Hi,

The reason you're getting that response is because JB's Wolfram code uses the pipe character "|" to separate the components of the answer (as you can see in the log).

[edit: rather, Wolfram Alpha seems to use the pipes on their end, which JB's code doesn't strip out, now that I look more closely.]

In VC, the pipe character in a TTS.Speak action tells VC to choose randomly from a series of possible responses. See: http://voxcommando.com/mediawiki/index.php?title=Actions#Speak

JB's code uses his own server etc., which isn't really necessary (i.e. you're sending your query to WA's server *through* his personal server). You might also want to try out the code I posted in my response, which uses only VC and Wolfram Alpha. http://voxcommando.com/forum/index.php?topic=789.msg10829#msg10829
« Last Edit: February 02, 2014, 04:14:19 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
Re: Siri like functionality i.e. ask your computer any question
« Reply #47 on: February 02, 2014, 05:24:16 PM »
Thanks for your code. It works well. I appreciate your efforts.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Siri like functionality i.e. ask your computer any question
« Reply #48 on: February 02, 2014, 05:34:45 PM »
Glad it's working for you.

Plus there's the additional bonus that you now know you can use the pipe character to get varied responses from a single TTS.Speak action (which can be nice when it's done intentionally  :biglaugh).
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Indy

  • $upporter
  • Jr. Member
  • *****
  • Posts: 23
  • Karma: 1
    • View Profile
Re: Siri like functionality i.e. ask your computer any question
« Reply #49 on: February 03, 2014, 05:09:59 PM »
Hello Everyone,

I'm a new user of Vox, just started playing with it on the weekend and love the potential.  Full credit to James and Paul for their Youtube video's that got me interested in this and integrating it into XBMC once I saw the potential.  My 3 year old son is already asking Vox for cookies, please don't integrate this functionality  ;) .  Like this thread has pointed out, the only really missing piece of the puzzle I've noticed so far is having Vox be resourceful and able to intelligently give me results to a vast array of questions.  Since I'm heavy into Android and Google's ecosystem, I love Google Now and find it has quite good results to general queries I make.  There is definitely some overlap in what Vox is doing and what Google wants to do as well.  Here is a good list of the commands, and I understand that some of these commands already have other functions in Vox's default commands, at least its XBMC integration component.

http://forum.xda-developers.com/showthread.php?t=1961636

I've seen some articles recently that Google Now has moved to Alpha stage through the Chrome browser on a PC and wondering if a plugin is possible to read back the Google Cards that are presented.  I'm not a programmer so this scraping with Python and Beautiful soup sounds very intimidating but I'm just wondering what others thoughts are on the possibility of this type of functionality.

http://www.pcworld.com/article/2088446/google-now-finally-invades-the-desktop-in-chrome-alpha-build.html

I'm just at the beginning of my learning adventure with Vox but love it so far.  I'm going to try the ask.com integration that was presented earlier in this thread but not sure if it is on the same level as Google Now's results. Nevermind, read the post more closely looks like its Wolfgram now.  Might try that out.
« Last Edit: February 03, 2014, 05:38:48 PM by Indy »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re:
« Reply #50 on: February 04, 2014, 09:40:43 AM »
Hi Indy. Welcome to the forum.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Siri like functionality i.e. ask your computer any question
« Reply #51 on: February 04, 2014, 07:24:55 PM »
There is definitely some overlap in what Vox is doing and what Google wants to do as well.  Here is a good list of the commands, and I understand that some of these commands already have other functions in Vox's default commands, at least its XBMC integration component.

http://forum.xda-developers.com/showthread.php?t=1961636

I can't help you with your dream of integrating Google Now I'm afraid, but this afternoon I tried most of the example voice commands listed in your xda forum link with minor adaptation of my existing custom commands and had pretty good luck.

To be fair, I already use the weather plugin (WUnder), the Google Calendar plugin etc., so it didn't take much doing. The Wolfram command (I've updated it a bit) actually works for a great many of their examples -- calculations, stock quotes, distances between cities, authors of books, height of Kobe Bryant, who's married to whom, ages of famous people, the weather on Friday, etc.

I used slightly more natural phrasing for many of my searches than they give in their examples, but I imagine natural phrasing might work OK with Google Now too.

To pull up a Google map is pretty easy with a Launch.URL command. An "I'm feeling lucky" Google search is also a good backup command.

As you say, we can already do a lot of things like opening/closing programs and websites, checking our google calendars, email and so on. So the main things that would take a bit of creativity would be navigation commands and that kind of thing.

I've attached a group of commands that you can play with a bit and adapt to your own needs/voice command phrase preferences if you like. They're somewhat customized to my metric locale.  (The weather command requires enabling and configuring the WUnder plugin.)

These successfully generated useful responses to about 90% of the xda example voice commands, but only when I'm using my "good mic", on account of the open dictation. I haven't included Google calendar-based commands, but I think there are probably some examples here on the forum if you haven't tried those out yet.

Welcome to the forum.

[anyone trying the attached Wolfram command will need to use their own API key in the command, of course.]
« Last Edit: February 04, 2014, 07:39:12 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Indy

  • $upporter
  • Jr. Member
  • *****
  • Posts: 23
  • Karma: 1
    • View Profile
Re: Siri like functionality i.e. ask your computer any question
« Reply #52 on: February 04, 2014, 11:02:11 PM »
that is amazing Nime5ter, thank you very much.  I'm just starting to play with the wolfram and am pleasantly surprised how well it reacts to natural speech queries, definitely on par with how I interact with my phone and tablet with Google now.  I'm just about to try and integrate everything in vox, shouldn't be hard, just need to look around these forums some more.  I'm also going to integrate your Google now commands separately and use them both once I get an alpha of chrome on my test machine.  Thanks so much for sharing your config, it really helps noobs like me figure this all out.




Figured out how to integrate it, works very well, like the fallback to Google.  Very nicely done!
« Last Edit: February 04, 2014, 11:32:40 PM by Indy »