Author Topic: Script to mute/un mute mic & Lower volume  (Read 8732 times)

0 Members and 1 Guest are viewing this topic.

adgwill

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Script to mute/un mute mic & Lower volume
« on: July 29, 2011, 10:44:17 AM »
Hi all,

I have been using my media centers for a few years wondering when software such as VC would be good enough to use.After stumbling across some very encouraging youtube clips i haven't even installed the trial yet but am excited to do so.

After reading through a few rather hit and miss reports of using various microphones (as i want to maximise the effectiveness of my trial),  i wondered if anyone had ever tried or had experience with a custom script triggered by a remote key press (i have in mind my Logitech Harmony remotes) to significantly reduce speaker volume (20%?) and un mute the mic for a period of time (bit of trial and error required id expect to get a good length of time).. This should in effect improve accuracy of any mic and start to reproduce the amulet's functionality). After the set time for the mic being un muted it would then return to being muted. I know its not true voice control as their would still be a button press involved but it could offer amulet levels of accuracy whilst still allowing for the use of custom multi device remotes and cheaper/easier to hide microphones.

If anyone knows of a good reason this wont work, if you could let me know before i commit my weekend to setting this all up that would be great. If not - i will report back if i find anything of use :)

Regards


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Script to mute/un mute mic & Lower volume
« Reply #1 on: July 29, 2011, 12:12:42 PM »
yes, this can be done.  If you need help from me in terms of adding / modifying VC just let me know.  You will need a way to communicate with VC though since it does not natively support remotes.  If you use eventGhost this is easy enough to do.  Information can travel both ways between VC and EventGhost through UDP broadcasts.

neomaycry

  • $upporter
  • Jr. Member
  • *****
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #2 on: January 09, 2012, 07:21:25 PM »
If you need help from me in terms of adding / modifying VC just let me know.

I would love if someone could steer me in the right direction toward making this same thing happen.  I am currently using a Harmony remote as well, and I love the idea of the amulet remote, but it doesn't seem to be as powerful in regard to launching multiple devices at the same time. 

For this reason, it would be nice to setup a communication between VC and Eventghost to allow the mic volume to be turned up and the system volume to be turned down on a remote press.  Can anyone explain a way to do this?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Script to mute/un mute mic & Lower volume
« Reply #3 on: January 09, 2012, 07:28:16 PM »
install the latest version of eventGhost.  It includes the broadcaster plugin.  Make sure that is installed as outlined here:

http://voxcommando.com/mediawiki/index.php?title=EventGhost

this allows you to send events to eventGhost from VoxCommando.

you can also send different commands back to voxCommando from eventGhost

I'll give you more info on that later.  I'm about to eat!  :P

neomaycry

  • $upporter
  • Jr. Member
  • *****
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #4 on: January 10, 2012, 06:41:25 PM »
Okay, I have Eventghost and Voxcommando talking to one another, and I've set up a simple "push this button to mute system volume and turn VC on for 3 seconds".  Now, I need to figure out a way for Eventghost to check to see if VC has received a command within that time frame.  If not, VC will be shut off, but if so, Eventghost will continue to wait until 3 seconds have passed without a recognized command.

I noticed that VC shows events, and those can be placed in Eventghost, but I didn't see an event that mentioned something like "command recognized".  Any ideas?

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #5 on: January 10, 2012, 07:18:41 PM »
Just go to the voxcommando options, set the idle timeout to 3sec and use eventghost only to turn voxcommando on.
voxcommando will then automaticly go in standby mode 3 sec after the last recognized command.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Script to mute/un mute mic & Lower volume
« Reply #6 on: January 10, 2012, 07:23:22 PM »
Okay, I have Eventghost and Voxcommando talking to one another, and I've set up a simple "push this button to mute system volume and turn VC on for 3 seconds".  Now, I need to figure out a way for Eventghost to check to see if VC has received a command within that time frame.  If not, VC will be shut off, but if so, Eventghost will continue to wait until 3 seconds have passed without a recognized command.

I noticed that VC shows events, and those can be placed in Eventghost, but I didn't see an event that mentioned something like "command recognized".  Any ideas?
If you look in VC options you'll see that you can set an idle timeout.  If you set this to 5 seconds, then whenever VC goes into green mode it will automatically return to Standby mode after 5 seonds.  At that point an event will be generated: vc.idletimeout

That event can be used to trigger a command that sends an event to EventGhost.

There is also an action in VoxCommando called VC.OnSingle: which will turn VC on for a single command.  After the subsequent command is recognized VC will return to standby and generate an event: VC.Single.End  But this action is really designed to be used with a voice command.

If you are using an older version of VC than 0.936 the VC.OnSingle action may not be available.

There are also just general event generated when VC goes from one mode to another (VC.On  -  VC.Standby   -  VC.Off)

neomaycry

  • $upporter
  • Jr. Member
  • *****
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #7 on: January 10, 2012, 11:31:42 PM »
That event can be used to trigger a command that sends an event to EventGhost.

Okay, this is the part I need to get working.  I've pretty much lined everything out, but I now need to send the vc.idletimeout as an event to eventghost, but I can't figure out how to do this is VC without having to start by issuing a command.  I don't want to verbally speak a command to send the event; I want the timeout event to be sent automatically when VC times out ... that way I can make eventghost turn the system volume back up.

Thanks for your patience.  I know this probably sounds redundant to a pro like yourself  ;).

Regards.

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #8 on: January 11, 2012, 03:27:06 AM »
create a normal vc command, but instead of using a phrase choose event. (picture 1)
you can now use either VC.Standby or vc.idletimeout to trigger your command.
« Last Edit: January 11, 2012, 08:42:55 AM by jitterjames »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #9 on: January 11, 2012, 04:57:35 AM »
Okay, this is the part I need to get working.  I've pretty much lined everything out, but I now need to send the vc.idletimeout as an event to eventghost, but I can't figure out how to do this is VC without having to start by issuing a command.  I don't want to verbally speak a command to send the event; I want the timeout event to be sent automatically when VC times out ... that way I can make eventghost turn the system volume back up.

Thanks for your patience.  I know this probably sounds redundant to a pro like yourself  ;).

Regards.
Hi neomaycry, you can it use also with logic, so it is more flexible and everything is possible  ;)

Kalle

PS: both of logic commands work
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Script to mute/un mute mic & Lower volume
« Reply #10 on: January 11, 2012, 08:01:12 AM »
What Dave and Kalle said!

Here's the easy way to trigger command with Events in VoxCommando if you like to learn by watching:


neomaycry

  • $upporter
  • Jr. Member
  • *****
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #11 on: January 11, 2012, 10:27:10 PM »
I have followed the directions that were given above, and I get an error message.  The command seems to be sent to EventGhost just fine when I am executing it manually inside the Command Builder (shown in the first image).

However, when I save and try to let the command go through automatically, I get the error message shown in the second image.

Any ideas why this might be?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Script to mute/un mute mic & Lower volume
« Reply #12 on: January 11, 2012, 11:58:31 PM »
I feel like this was fixed in a later version .  Try it in 0.936.  Or if you want, you can zip up your folder and email it to me.  My email addr is: myForumHandle@gmail.com

neomaycry

  • $upporter
  • Jr. Member
  • *****
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Script to mute/un mute mic & Lower volume
« Reply #13 on: January 12, 2012, 09:06:20 PM »
I feel like this was fixed in a later version .  Try it in 0.936.  Or if you want, you can zip up your folder and email it to me.  My email addr is: myForumHandle@gmail.com

I upgraded to 0.936, and this fixed it.  Thanks!