Author Topic: 2 Way Conversation!  (Read 7063 times)

0 Members and 1 Guest are viewing this topic.

mrmagica

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
2 Way Conversation!
« on: August 29, 2013, 05:47:23 PM »
Hi All. Amazing bit of software, enjoying playing around.

I've spent last hour trying to get some "Human Touch" going. A user prompt, a computer question, a user prompt, and a computers response and action.  I've watched the youtube videos on "human touch" which almost gets it done but in that it is achieved by starting a new branch, which really isn't part of the original conversation, or branch, and there fore seems it could be triggered at any time out of place. Let me explain what I want to achieve - if I can do this I will apply it to all sorts of other uses.


Me: Hello Computer

VC: Hello. Who am I speaking too?

(Now from this point I would like to have 3 possible people that would then branch to seperate replies and actions. It would be nice if I could say any other name for a simple polite end of tree. IE, User: "Guest".... VC) "Hello 'Guest' enjoy using VoxCommando. Would you like to listen to music?" I tried using payload but i hit a brick wall past one user input and one computer response in the same branch.)

*branch 1*
User: Michael                                                      

VC: Hello Michael. Would you like to watch recent TV episodes.?

User: "yes"

VC) Displays recent TV

*branch 2*
User: Lisa

VC: Hello Lisa would you like to listen to your favourite Music?

----you get the idea!....



Seems like it should be easily achievable but no matter how I mess around with logic, and payloads past the first input output I hit a wall.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 2 Way Conversation!
« Reply #1 on: August 29, 2013, 07:24:43 PM »
Hi MR.M.

Welcome to the forum.

I think what you are looking for is the ability to enable and disable groups.  So you can have a group with your commands "this is michael", "this is anne", "this is joe" etc.

This group can be off by default, and when the computer asks "who am I speaking to" you turn the group on using VC.EnableGroup.

Nime5ter is working on an example for you that should make this much more clear, but I just wanted to point you in the general direction of a solution.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: 2 Way Conversation!
« Reply #2 on: August 29, 2013, 07:44:17 PM »
Hi Mr. Magica,

Attached is a file with 2 command groups.  The first one (puny humans) has just one command, which is the first line of your sample script: "Hello Computer". This command enables the other group, which contains particular user options. If you don't first say this, the group remains disabled and VC shouldn't accidentally trigger those commands.

The second group corresponds to the rest of your script. You should be able to test it out by responding "This is Michael/Lisa" (and some variations--see the xml) when prompted.

Hope it helps. If anything is unclear, let me know.
« Last Edit: September 23, 2013, 12:30:44 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)

mrmagica

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: 2 Way Conversation!
« Reply #3 on: August 29, 2013, 09:03:15 PM »
fantastic guys that is excellent! Makes alot more sense dynamically enabling groups - thankyou!

mrmagica

  • Jr. Member
  • **
  • Posts: 23
  • Karma: 0
    • View Profile
Re: 2 Way Conversation!
« Reply #4 on: August 29, 2013, 09:50:32 PM »
That will work perfectly in that macro....

Last question; In this case the computer asks the question, and assumes the user will want to watch tv, (or listen to music) requiring the confirmation/cancel on the next command. How about VC gives an optional query:

VC: Hello Michael. Would you like to watch your new TV episodes, or maybe watch a Movie?

Michael: Movie      -{possible?}

Now I realize Michael could use a full command to trigger a new event "Play Movie Avatar" for example, and Movie is far too broad as a global command, but that's not very natural or easy for someone non familiar with VC, trying to have this virtual conversation and achieving the correct outcome. How about being able to give short answers that would only apply to that command - in this case simply "Movie" but could be "music" "yes" etc....


Impossible?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 2 Way Conversation!
« Reply #5 on: August 29, 2013, 10:06:28 PM »
It is possible, you just need to apply the same logic of enabling groups.  In that newly enabled group you can have a command for "movie" or whatever other options you want... The computer suggests some new set of options or whatever, and then enables a group with those commands in it.  You should remember to disable the group after one of those commands is recognized.  It is not necessary to use confirmations.  Although it would be tiresome for the TTS to list all possible options, you could show them using OSD.ShowText

If you try to continually lead users through conversations that rely on context though, it will probably backfire in the end because VC was just not designed to work this way.  To some extent, it can be accomplished using groups, but eventually this method will probably become somewhat cumbersome to employ.

You might be better off printing a "menu" of commands (available on the 'help' menu) or by trying to devise some method for VC to teach people new commands.
« Last Edit: August 29, 2013, 10:09:41 PM by jitterjames »

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: 2 Way Conversation!
« Reply #6 on: November 13, 2013, 11:20:31 PM »
The second option with the xml to reference is perfect.  However, I am not a programmer and can't figure out how to get the xml into VC so I can edit to my liking.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: 2 Way Conversation!
« Reply #7 on: November 14, 2013, 12:59:51 AM »
Download the xml file and then drag and drop it in your VC command tree  ;)
***********  get excited and make things  **********

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: 2 Way Conversation!
« Reply #8 on: November 14, 2013, 01:42:25 AM »
I get an error when I tried to drag and drop.  Says invalid xml
« Last Edit: November 14, 2013, 01:44:30 AM by ddl »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 2 Way Conversation!
« Reply #9 on: November 14, 2013, 02:11:20 AM »
Which xml file is giving you that error when you drag it into the editor window?