Author Topic: Microphone + Picking up TTS  (Read 6417 times)

0 Members and 6 Guests are viewing this topic.

ThermoDust

  • $upporter
  • Jr. Member
  • *****
  • Posts: 9
  • Karma: 0
    • View Profile
Microphone + Picking up TTS
« 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?

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Microphone + Picking up TTS
« Reply #1 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


Kalle
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Microphone + Picking up TTS
« Reply #2 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.

ThermoDust

  • $upporter
  • Jr. Member
  • *****
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Microphone + Picking up TTS
« Reply #3 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.

ThermoDust

  • $upporter
  • Jr. Member
  • *****
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Microphone + Picking up TTS
« Reply #4 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?

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Microphone + Picking up TTS
« Reply #5 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
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Microphone + Picking up TTS
« Reply #6 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"


Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Microphone + Picking up TTS
« Reply #7 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"
« Last Edit: November 20, 2011, 09:45:58 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Microphone + Picking up TTS
« Reply #8 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"

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Microphone + Picking up TTS
« Reply #9 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"
« Last Edit: November 20, 2011, 10:30:27 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Microphone + Picking up TTS
« Reply #10 on: November 20, 2011, 10:27:42 AM »
edited:

OK.  you need

{PreviousCommand}

let me look into it...
« Last Edit: November 20, 2011, 10:39:07 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Microphone + Picking up TTS
« Reply #11 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.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Microphone + Picking up TTS
« Reply #12 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
« Last Edit: November 20, 2011, 11:31:25 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Microphone + Picking up TTS
« Reply #13 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!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Microphone + Picking up TTS
« Reply #14 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
***********  get excited and make things  **********