VoxCommando

General Discussion => General Discussion => Topic started by: ThermoDust on November 19, 2011, 01:33:36 AM

Title: Microphone + Picking up TTS
Post by: ThermoDust on November 19, 2011, 01:33:36 AM
So, I am getting close to being able to walk around my apartment and able talk to my computer. However it seems that when the TTS is talking back to me my mic will pickup its voice and try to carry out commands. Can I put a stop listen to mic in the logic when playing a TTS voice so it only starts to listen again after it is done speaking?
Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 19, 2011, 07:38:58 AM
So, I am getting close to being able to walk around my apartment and able talk to my computer. However it seems that when the TTS is talking back to me my mic will pickup its voice and try to carry out commands. Can I put a stop listen to mic in the logic when playing a TTS voice so it only starts to listen again after it is done speaking?
Hi ThermoDust, use the "prefixmode" in the main option menue, with this setting your computer recognized only a command when you say a prefix before. Example: "Computer" - "What time is it" - Computer is the prefix. Take a look here for more details.

http://voxcommando.com/mediawiki/index.php?title=Options (http://voxcommando.com/mediawiki/index.php?title=Options)


Kalle
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 19, 2011, 09:09:51 AM
you can also try putting a vc.off at the beginning of your commands that use tts and then a vc.on at the end.

I haven't tried this though...

if you have a mic that picks up everything from anywhere in your home then you are going to want to use prefix mode but even with that I think you may find it can be problematic.
Title: Re: Microphone + Picking up TTS
Post by: ThermoDust on November 20, 2011, 01:08:21 AM
Okay, I am using prefix mode and it still thinks I say the word to activate it some times. I guess I will just have to play around with the prefix word to make work better... but even with a simple problem like that I think I am still going to buy vox as it is working great and its fun.
Title: Re: Microphone + Picking up TTS
Post by: ThermoDust on November 20, 2011, 01:12:34 AM
Oh, two more questions. One what is the command that I can use in the a=b area of logic that repersents the phrase that vox heard to triger the event? And last question is there a way to have a must confirm that interacts with the a=b? Like a delay or while/if loop? Example would be:

if a=b then ask question would you like an apple today? wait for response if response = yes do this if not do this?
Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 20, 2011, 05:12:05 AM
Oh, two more questions. One what is the command that I can use in the a=b area of logic that repersents the phrase that vox heard to triger the event? And last question is there a way to have a must confirm that interacts with the a=b? Like a delay or while/if loop? Example would be:

if a=b then ask question would you like an apple today? wait for response if response = yes do this if not do this?
Hi ThermoDust, the if "A==B" work great with "{LastResult}", but you can use also the if "(A)Contains(B)". An example how you can use (with MediaMonkey) this logic, you'll find in attachment.
This logic is a rating feedback for a song in MediaMonkey (when you have rate it  ;) )
This example is in german an will say : rating 10-40%= not so good ... 100%=top hit.

For second question: makes in VoxCommando little sense, if you have multiple questions, whose answer is yes or no, Voxcommando could not be more different, one of which command is the Yes or No
You can use the pandorabot command, for a little bit interact with you pc.

Kalle
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 20, 2011, 09:30:57 AM
Oh, two more questions. One what is the command that I can use in the a=b area of logic that repersents the phrase that vox heard to triger the event? And last question is there a way to have a must confirm that interacts with the a=b? Like a delay or while/if loop? Example would be:

if a=b then ask question would you like an apple today? wait for response if response = yes do this if not do this?

it is not set up to work this way.  It would be better to give us a real world scenario of what you want to do so we can propose alternatives.  There is no way to represent the whole phrase.  Normally you would look at the payloads in the command and enter then in the a/b fields like this: {1}

I will add the whole command text at some point {LastSpoken}

Note that if you say "play artist marley" then the payload will contain the whole artist name {Bob Marley and the Wailers}, but the {LastSpoken} variable (when I add it) will only contain the words you actually said: "play artist marley"

Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 20, 2011, 09:35:16 AM
it is not set up to work this way.  It would be better to give us a real world scenario of what you want to do so we can propose alternatives.  There is no way to represent the whole phrase.  Normally you would look at the payloads in the command and enter then in the a/b fields like this: {1}

I will add the whole command text at some point {LastSpoken}

Note that if you say "play artist marley" then the payload will contain the whole artist name {Bob Marley and the Wailers}, but the {LastSpoken} variable (when I add it) will only contain the words you actually said: "play artist marley"


Hi James, (lastspoken) is exactly what I need  :yay
Is this also possible? LogicBlockCommand like: if - "last recognized command"
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 20, 2011, 10:22:35 AM
Hi James, (lastspoken) is exactly what I need  :yay
Is this also possible? LogicBlockCommand like: if - "last recognized command"

Yes I will add {LastSpoken} in the next release.  I promise :)

I don't understand what you mean:  if - "last recognized command"
Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 20, 2011, 10:25:17 AM
Yes I will add {LastSpoken} in the next release.  I promise :)

I don't understand what you mean:  if - "last recognized command"
see attach

If - last recognized command -  "play"
Then - "any action"
Else - "any action"
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 20, 2011, 10:27:42 AM
edited:

OK.  you need

{PreviousCommand}

let me look into it...
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 20, 2011, 10:40:11 AM
how would you use this?

I can think of some applications for it, but I'm wondering what you are thinking of.
Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 20, 2011, 10:50:35 AM
a picture might be worth a 1000 words, but apparently I need more.  I don't know what you want.  Explain it in German if you want.
Haha, this can solve my softmute/unmute problem in MM with intercom prefix and idle time out.
I can init in the vc.idletimeout command a logic block with:

if(not)- last recognized command - "mm.setVolume"
then - mm.softunmute
          xbmc.softunmute

the yellow mark is the problem (double unmute with set volume)

We can also make some interactive things with VC  ;)
if- lastregCommand contains "anything" then "any action or any tts.speak"

I've make some logic with the google weather-plugin.
example in attach pic
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 20, 2011, 12:45:01 PM
Ha.  I did something similar with the weather plugin.  If temp < 10 then tts "you're not going to like this | I've got some bad news for you | It's pretty nippy"

Of course in the winter I'm going to have to change it to: if temp < -10


You are going to have to find a different reason to use {PreviousCommand} because I am fixing the MM.softmute command for the next release too!
Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 20, 2011, 01:17:28 PM
Ha.  I did something similar with the weather plugin.  If temp < 10 then tts "you're not going to like this | I've got some bad news for you | It's pretty nippy"

Of course in the winter I'm going to have to change it to: if temp < -10


You are going to have to find a different reason to use {PreviousCommand} because I am fixing the MM.softmute command for the next release too!
I like your fast work, that is pretty cool  ::bow

Kalle
Title: Re: Microphone + Picking up TTS
Post by: ThermoDust on November 20, 2011, 07:30:17 PM
Sorry, I guess I should focus on asking one question and getting one task done just my brain is thinking of so many ideas for this program and I can't help but not to much at once as I really am digging this program and its potential.

So, my first question is about the MustConfirm. From what I can tell the MustConfirm pauses the command and waits for a response. But what I would like is have a MustConfirm pause but speak a question. An example would be I am trying to setup a command to have Vox send a command to a computer to restart but I would like it to verbaly confirm with me that I want to restart then after I say confirm a count down starts. But during the count down I can say cancel reboot for machine blah and have it stop the reboot command.
Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 21, 2011, 04:34:31 AM
Sorry, I guess I should focus on asking one question and getting one task done just my brain is thinking of so many ideas for this program and I can't help but not to much at once as I really am digging this program and its potential.

So, my first question is about the MustConfirm. From what I can tell the MustConfirm pauses the command and waits for a response. But what I would like is have a MustConfirm pause but speak a question. An example would be I am trying to setup a command to have Vox send a command to a computer to restart but I would like it to verbaly confirm with me that I want to restart then after I say confirm a count down starts. But during the count down I can say cancel reboot for machine blah and have it stop the reboot command.

No problem, you can find information about confirm a command here: http://voxcommando.com/mediawiki/index.php?title=Command_Builder (http://voxcommando.com/mediawiki/index.php?title=Command_Builder) (pkt. 1.1) and http://voxcommando.com/mediawiki/index.php?title=Options (http://voxcommando.com/mediawiki/index.php?title=Options) (pkt. 1.7)

Kalle

Title: Re: Microphone + Picking up TTS
Post by: ThermoDust on November 21, 2011, 05:13:08 AM
That informatin I found, what I wanted was a way to make a confirm option that would speak to me and not just pause the script. That way I do not need to be in front of screen to know it is waiting.
Title: Re: Microphone + Picking up TTS
Post by: Kalle on November 21, 2011, 07:11:02 AM
That informatin I found, what I wanted was a way to make a confirm option that would speak to me and not just pause the script. That way I do not need to be in front of screen to know it is waiting.
Ok, do you mean this example?

You: Computer, reboot "xyz"

VC: are you really sure to reboot the system "xyz"?

You: Yes, do it -->counter 10sec.(between 0-10 sec. you can cancel this command) -->"xyz" reboot
You: No, cancel -->VC do nothing

Is this scenario correct?

Kalle
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 21, 2011, 07:59:47 AM
You are in luck.  This feature is part of the new version which I am releasing this morning. :)

Basically how it works is that whenever a command is triggered that requires confirmation, an event is generated with the name of the command.  So you can use that event to make VC ask a question using TTS.

The rest of the problem with the count down should be possible, but is a bit tricky.  You would need to use a combination of usertimer, uservariable, and a logic block.
Title: Re: Microphone + Picking up TTS
Post by: jitterjames on November 21, 2011, 09:43:17 AM
new version is released.  You can use events generated by confirm commands to prompt the user.

http://voxcommando.com/forum/index.php?topic=659.0
Title: Re: Microphone + Picking up TTS
Post by: ThermoDust on November 21, 2011, 03:44:02 PM
Ok, do you mean this example?

You: Computer, reboot "xyz"

VC: are you really sure to reboot the system "xyz"?

You: Yes, do it -->counter 10sec.(between 0-10 sec. you can cancel this command) -->"xyz" reboot
You: No, cancel -->VC do nothing

Is this scenario correct?

Kalle
Yep, thats what I want.

You are in luck.  This feature is part of the new version which I am releasing this morning. :)

Basically how it works is that whenever a command is triggered that requires confirmation, an event is generated with the name of the command.  So you can use that event to make VC ask a question using TTS.

The rest of the problem with the count down should be possible, but is a bit tricky.  You would need to use a combination of usertimer, uservariable, and a logic block.
Excellent!