Author Topic: How to trigger a TTS Greeting bassed on prefix only?  (Read 8644 times)

0 Members and 1 Guest are viewing this topic.

mparks

  • $upporter
  • Contributor
  • *****
  • Posts: 93
  • Karma: 0
    • View Profile
How to trigger a TTS Greeting bassed on prefix only?
« on: October 07, 2011, 03:27:15 PM »
Is it possible to have TTS say a responses only when a vox prefix alone is said and not when a prefix is combined with a command?
For example:

1.   
Me: “ Computer “  ( prefix only )
TTS:  “Yes, I am listening”
Me: “launch XMBC”
TTS: “launching XBMC”
Vox: execute command.

2.
Me: “Computer”
TTS: “Good evening, I am listening”   – response based on time of day.
Me: “launch XBMC”
TTS: “launching XBMC”
Vox: execute command.

3.
Me: “Computer launch XMBC”  - ( prefix + command = greeting is bypassed)
TTS: “launching XBMC”
Vox: execute command.

TTS will respond with a greeting when only the prefix alone is said but it will not give a greeting when the prefix + command is said, it will just execute the command and give a confirmation.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #1 on: October 07, 2011, 04:51:45 PM »
Yes, it is possible to do that but then you are not actually using a prefix in case 1 and 2.  A prefix is where you say the prefix as part of a single sentence.

Based on what you are describing you are simply telling the computer to listen by saying "computer".  You can edit the listen command to give a TTS response in addition to going into green mode, and you can change the phrase that triggers the command to include "computer" if it is not already there.

In your 3rd example you are actually using prefix mode.  I'm not 100% sure how well it would work if you used the phrase "computer" for both your prefix and your listen command but you can try it.

Response based on time of day is a bit trickier given our current toolset.  We can check if {shorttime} contains AM and if so it's morning.  Otherwise it could be afternoon or evening.  Checking the actual time might be possible but I'm not sure right now how we could do that.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #2 on: October 07, 2011, 09:54:59 PM »
Yes, it is possible to do that but then you are not actually using a prefix in case 1 and 2.  A prefix is where you say the prefix as part of a single sentence.

Based on what you are describing you are simply telling the computer to listen by saying "computer".  You can edit the listen command to give a TTS response in addition to going into green mode, and you can change the phrase that triggers the command to include "computer" if it is not already there.

In your 3rd example you are actually using prefix mode.  I'm not 100% sure how well it would work if you used the phrase "computer" for both your prefix and your listen command but you can try it.

Response based on time of day is a bit trickier given our current toolset.  We can check if {shorttime} contains AM and if so it's morning.  Otherwise it could be afternoon or evening.  Checking the actual time might be possible but I'm not sure right now how we could do that.
I am not sure, but with a logic command in command builder like this "if - A contains B - Then - action -Else - action

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

mparks

  • $upporter
  • Contributor
  • *****
  • Posts: 93
  • Karma: 0
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #3 on: October 08, 2011, 12:27:56 AM »
"Based on what you are describing you are simply telling the computer to listen by saying "computer".  You can edit the listen command to give a TTS response in addition to going into green mode, and you can change the phrase that triggers the command to include "computer" if it is not already there."

Thank you, I was not clear on the Prefix use, I think I understand now.
So here is what I am trying to do.

I am trying to get TTS to responded when the listen phrase is given but only if the listen phrase is said without any additional commands,
When that happens TTS will add a random response to the listen response. Something like "good morning, I am listening" or " It's 1am, you should be sleeping, how can I assist you"

maybe Vox could randomly pick from a list of responses based on time of day.

And finally, If the listen phrase is given with additional commands, then TTS will only give a confirmation response and not a greeting.

I hope that makes a bit more sense.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #4 on: October 08, 2011, 06:07:45 AM »
Is it possible to have TTS say a responses only when a vox prefix alone is said and not when a prefix is combined with a command?
For example:

1.   
Me: “ Computer “  ( prefix only )
TTS:  “Yes, I am listening”
Me: “launch XMBC”
TTS: “launching XBMC”
Vox: execute command.

2.
Me: “Computer”
TTS: “Good evening, I am listening”   – response based on time of day.
Me: “launch XBMC”
TTS: “launching XBMC”
Vox: execute command.

3.
Me: “Computer launch XMBC”  - ( prefix + command = greeting is bypassed)
TTS: “launching XBMC”
Vox: execute command.

TTS will respond with a greeting when only the prefix alone is said but it will not give a greeting when the prefix + command is said, it will just execute the command and give a confirmation.

Hi mparks, welcome to VC forum.
Here is a solution for your second example:

step 1: save the attached time.vbs in the VC folder or any other place on your computer  ;) and the attached "VcGrp_time check.xml" in the export folder of VC

step 2: open the command builder in VC and click "open a new bin file", select the "VcGrp_time check.xml" and click open.

step 3: drag and drop the "time check" group from the right side to the commandtree on the left side. Double-click on the "time check" command and edit the path where do you save the "time.vbs"

Save all and restart VC

What does the Command? When VC change from standby (yellow) to ON (green), VC welcome you with the correct form of address depending on time.

You can edit the time.vbs in notpad-editor, so VC can say what you want when it switched on.

I hope it help you  ;)

Kalle
« Last Edit: October 08, 2011, 07:46:05 AM by Kalle »
***********  get excited and make things  **********

mparks

  • $upporter
  • Contributor
  • *****
  • Posts: 93
  • Karma: 0
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #5 on: October 08, 2011, 01:15:26 PM »
 ;D You guys are officially Kings of Kings.
Your responses are extremely fast and you already have a solution, that is so crazy.
I have been playing with Dragon Naturally Speaking over the years and now I am testing out v11.5 pro on a friends computer. It's great for sending emails and using MS office but not as good as Vox for controlling the computer, maybe I just have not figured it out yet.
With Vox, I tired it once and bought it right away, Good work guys.

I am going to go play with this solution and get back you.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #6 on: October 08, 2011, 02:35:39 PM »
Awesome.  Thanks for the positive feedback.  Dragon Naturally Speaking is great for dictation but I don't think it's really geared towards the multimedia experience or even towards controlling the computer, or doing home automation etc.  And then there is the high price tag!  I just played with Dragon a bit a couple years ago, so I'm not really sure what it is capable of.  Once I figured out that Dragon and MS speech recognition could not do what I wanted, I started to create VoxCommando.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #7 on: October 08, 2011, 02:37:26 PM »
Starting with Kalle's vbs script, I added a bit of randomization to the possible responses.

see the attached file.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #8 on: October 08, 2011, 02:47:06 PM »
Starting with Kalle's vbs script, I added a bit of randomization to the possible responses.

see the attached file.
Ha ha, cool, but it was not my script - the script was programmed by member "rudmei" here in forum  ;)
I've only found here again and edit it a little bit.

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

mparks

  • $upporter
  • Contributor
  • *****
  • Posts: 93
  • Karma: 0
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #9 on: October 08, 2011, 04:07:46 PM »
Thanks again guys, this is indeed what I had in mind.

 ???

I am currently having an odd problem with the TTS voice used in the script.

I installed the "Bridget" voice from neo but she does not show up in my windows Voice selection, instead "Brian" from Ivona does which is also installed and is selected as the default

Somehow Vox can see all my installed voices and I have "Bridget" set as the default voice in Vox not "Brian".

Here is the problem, this time script used the voice that windows voice selection has set as default which is "Brian" and not the one that is set as default in vox which is "Bridget"

So now I have two voice active, "Brian" is triggered when I go into listen mode and "Bridget" is used for everything else.

My computer now has an identity complex.

Is there a way to have the script use the default voice selected in Vox and not the one set in the windows Voice selection?


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #10 on: October 08, 2011, 04:26:54 PM »
I think you have to use the default windows voice with vbscript.

The issue you have with selection of voices is that windows 64 bit won't show 32 bit voices even though they work fine. 

To get around it you can try to run this:

C:\Windows\SysWOW64\Speech\SpeechUX\sapi.cpl

which should give you the same control panel for selecting voices except that 32 bit voices should be available.

I compile voxCommando as a 32 bit application specifically to avoid this problem in VC.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #11 on: October 08, 2011, 04:28:33 PM »
Thanks again guys, this is indeed what I had in mind.

 ???

I am currently having an odd problem with the TTS voice used in the script.

I installed the "Bridget" voice from neo but she does not show up in my windows Voice selection, instead "Brian" from Ivona does which is also installed and is selected as the default

Somehow Vox can see all my installed voices and I have "Bridget" set as the default voice in Vox not "Brian".

Here is the problem, this time script used the voice that windows voice selection has set as default which is "Brian" and not the one that is set as default in vox which is "Bridget"

So now I have two voice active, "Brian" is triggered when I go into listen mode and "Bridget" is used for everything else.

My computer now has an identity complex.

Is there a way to have the script use the default voice selected in Vox and not the one set in the windows Voice selection?


This is no problem, you can use the "TTS.SetVoiceName" command before trigger the time.vbs - see attached pic

 :bonk I have this not tested with time.vbs
« Last Edit: October 08, 2011, 04:32:03 PM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #12 on: October 08, 2011, 05:01:45 PM »
that only changes the voice in Vox not in the vbs script.

mparks

  • $upporter
  • Contributor
  • *****
  • Posts: 93
  • Karma: 0
    • View Profile
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #13 on: October 08, 2011, 09:27:02 PM »
@jitterjames

"C:\Windows\SysWOW64\Speech\SpeechUX\sapi.cpl"

That did it. I can now select the correct voice and she is happy again. No more gender confusion.

How about this for an idea while still on the same subject.

I am thing of modifying the time script to give more ranges in the times like maybe break it down into 30 min increments.
something like ( If time is between 13:00 and 13:30 say this, this or this. IF time is between 14:00 and 14:30 say this, this or this ) and so on. Then randomize the responses a bit more between those 30 min increments

I think that will give it more of an unpredictable feel.

would doing this slow things down? is there some kind of limit that will cause a response lag or side effect?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to trigger a TTS Greeting bassed on prefix only?
« Reply #14 on: October 08, 2011, 09:37:59 PM »
you should be able to go crazy with it and you won't notice any extra time delay.  Give it a shot.