Author Topic: Triggers  (Read 2172 times)

0 Members and 1 Guest are viewing this topic.

bp_pbs

  • Contributor
  • ***
  • Posts: 94
  • Karma: 1
    • View Profile
Triggers
« on: March 05, 2012, 01:27:57 AM »
I am not sure if this has been asked before but is there a way to get Vox to trigger a command base on a response.

Ex.
I say: Hi
Vox says: Hello, how are you doing today?

And based off my response (Not good; Could be better; I’m Great) it triggers another response for each one. Right now I have them separate but use prefix mode. So I have to keep saying Computer Hi….Computer Not good…

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Triggers
« Reply #1 on: March 05, 2012, 04:22:17 AM »
You can use if-statements with (A)==(B) and {LastSpoken}  to trigger a response based on your answer.
I'm still not at home but i try to describe what you could do:

1.command triggerd by "hi"
Tts.speaksync: "how are you "
VC.OnSingle (so you don't need to say your prefix for your answer)

2.command triggerd by all your possible answers:
If a==b {lastspoken} I'm fine
Tts.speak: "happy to hear that"
VC.StopMacro
If a==b {lastspoken}  could be better
Tts.speak: hope you feel better soon
VC.StopMacro
If ...


Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Triggers
« Reply #2 on: March 05, 2012, 04:57:08 AM »
If you just need a tts response based on answer and not different actions, there is an easier solution:

You can trigger the 2.command by payload from xml value/phrase. Phrase is your answer, value the matching response.
In the command you can use tts.speak {1} to get the right response.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Triggers
« Reply #3 on: March 05, 2012, 09:29:11 AM »
Good idea Dave!

You can also use pandorabots but you still need to clearly define what is a command and what is just you talking, so one way or another you are going to need some kind of prefix to let VC know that you are just talking to it to pass the time...  Just remember that you always have to balance flexibility with accuracy.  If you try to make your commands too flexible you will evntually run into a situation where VC starts misunderstanding you because your commands are becoming ambiguous.

http://voxcommando.com/mediawiki/index.php?title=Actions#PandoraBot

bp_pbs

  • Contributor
  • ***
  • Posts: 94
  • Karma: 1
    • View Profile
Re: Triggers
« Reply #4 on: March 05, 2012, 03:19:28 PM »
Ok Thanks I will try this