Author Topic: Amulet Remote and VirtualBox  (Read 17273 times)

0 Members and 3 Guests are viewing this topic.

ajith

  • $upporter
  • Contributor
  • *****
  • Posts: 87
  • Karma: 2
    • View Profile
Amulet Remote and VirtualBox
« on: April 29, 2012, 04:07:38 AM »
The first thing you need to do is download the extras from the download page:

http://voxcommando.com/downloads.asp

click "Download Extras" and you will get the file: "VoxCommandoExtras.zip"
Unzip the files.  The one we need is called: "AmuletUSB"

this program needs to be running at all times.  You can minimize it to the notification area so it won't take up space on your taskbar.  If you want to have this program start every time you start windows there are many ways to do this.  Here is one: http://www.addictivetips.com/windows-tips/how-to-run-programs-automatically-on-windows-7-system-startup/

Now when this program is running, events should appear in your VoxCommando 'History' pane whever you raise or lower the microphone.  Open the tree editor and drag the events from the history pane onto any command.  From now on, this command will execute automatically when the event occurs.  It is that simple.  You can create custom commands to do whatever you want when the amulet mic turns on or off.

If want a ready made solution, you can start by importing the attached group into your VC command tree.  It contains two commands that will turn VC on and off, and partial-mute and unmute your system volume.


Hi James,


I am using Vox within a Windows 7 Virtual Machine that is running on a Ubuntu Linux box ( http://voxcommando.com/forum/index.php?topic=702.0 )
I have recently acquired an Amulet Remote which is working fine with my setup as follows:

  • The Amulet USB dongle is plugged into the box running the Ubuntu Linux (host), and is detected by the host OS (Linux) as an audio device having a microphone.
  • The Win 7 in the VM (guest) OS does not see the "Amulet USB dongle" at all, but does detect a "microphone" via the virtual hardware emulation
  • Voice recognition works in the guest OS using the emulated virtual (dumb) microphone.

Now, as we might guess, AmuletUSB.exe running in the Win 7 VM does not detect the Amulet USB dongle or the events it produces.

So my issue is, I can't use this "Make VC listen and not listen, and adjust volume" feature unless I have a way in Linux to know the state of the microphone. I'm wondering if this is possible ... a la AmuletUSB program for linux :)


Thanks and Regards
Ajith



 

 

« Last Edit: April 30, 2012, 06:47:45 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Making VC listen and not listen, and adjust volume
« Reply #1 on: April 29, 2012, 07:53:04 AM »
Wow.  That's a tough one.  I don't know much about this stuff.  So, linux needs to have a working driver, and windows does too, in order to access a USB device?  I would have though that virutalbox would have passed communication through to the device somehow directly.  I'll ask Eddy from Amulet to take a look at your post, but it seems unlikely.

When I created the Amulet USB notifier for VC I took code provided by Amulet and did the absolute minimum modification to it treating most of it as a black box.  I don't know anything about writing device drivers.

It's not really all that necessary to turn VC on and off since the mic turns on and off and when it is off it's completely silent so VC is not really using much CPU power, and there is certainly no chance of a false command firing when the remote is off.  One problem though, unless Amulet fixed it since I got mine over a year ago... the amulet makes a "pop" when it switches on (yes every time you lift it), which can throw VC off for a couple of seconds.  You may find you have to wait a bit longer after lifting the mic before you start talking.  :'(  In terms of attenuating the system volume, that is a nice feature, but the Amulet does surprisingly well even in a loud environment because the mic mostly just picks up sounds that are very close to it.

edit: it doesn't help that the virtualbox servers "...will be down for maintenance from Friday April 27th, 5PM PDT til Monday April 30th"  :bonk
« Last Edit: April 29, 2012, 08:09:42 AM by jitterjames »

ajith

  • $upporter
  • Contributor
  • *****
  • Posts: 87
  • Karma: 2
    • View Profile
Re: Making VC listen and not listen, and adjust volume
« Reply #2 on: April 29, 2012, 01:09:28 PM »
... I would have though that virutalbox would have passed communication through to the device somehow directly.

That did it for me! I re-checked and found that VirtualBox does indeed have the ability to just pass through the USB devices onto the Guest OS. I had to install a VirtualBox "Extension Pack" and add my Linux user to a certain group to enable USB-EHCI support for the VM. I did that, and lo and behold, the Windows OS in the VM recognized the Amulet USB dongle directly (as it should, by design), and all is well :)

So thank you for the hint :)

Coming to why I needed this feature badly - well, originally I wanted the volume attenuation, but that is sort of difficult as I use an older Onkyo Receiver with an S/PDIF link for the audio. So controlling the Linux System volume doesn't cut it.
I found that muting the Linux System volume does work, though. So I settled for this for now. I'm using the Amulet Microphone event to mute/unmute.


... .. the amulet makes a "pop" when it switches on....

I do not hear any popping. So this is probably fixed.

The Amulet remote's mic does indeed work great. Only gripe I have is the delay when I first pick it up after a while of inaction. The RF link probably takes time waking up.

On a completely different note, can I configure the location where the VoxSmart.xsp gets created when loading a XBMC Smart Playlist?


Thanks and regards,
Ajith

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Making VC listen and not listen, and adjust volume
« Reply #3 on: April 29, 2012, 04:59:38 PM »
So thank you for the hint :)
a lucky comment I guess.  ^-^

On a completely different note, can I configure the location where the VoxSmart.xsp gets created when loading a XBMC Smart Playlist?

Not at the moment.  Are you not able to access your VC folder from XBMC for some reason?

You can trying using File.Copy

It should be pretty quick.

eddyc

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 2
    • View Profile
    • Amulet Devices
Re: Making VC listen and not listen, and adjust volume
« Reply #4 on: April 29, 2012, 06:08:28 PM »
That did it for me! I re-checked and found that VirtualBox does indeed have the ability to just pass through the USB devices onto the Guest OS. I had to install a VirtualBox "Extension Pack" and add my Linux user to a certain group to enable USB-EHCI support for the VM. I did that, and lo and behold, the Windows OS in the VM recognized the Amulet USB dongle directly (as it should, by design), and all is well :)
I'm a little late to the party here, but glad to hear there was a straightforward (if non-obvious) solution. Nicely resolved!

Quote
I do not hear any popping. So this is probably fixed.
The popping James mentioned is caused by a bug in the firmware on the wireless transmitter chipset we use. It's been fixed by the manufacturer now, and will be included in our next production run, but the unit you have is probably still affected. However, we did rev our own firmware to mute the mic when the radio link is initially activated, which does a reasonable job of working around it.

Quote
The Amulet remote's mic does indeed work great. Only gripe I have is the delay when I first pick it up after a while of inaction. The RF link probably takes time waking up.
Yep, that's exactly it - the RF link takes about 700ms to wake up from cold. Once it's awake, the response should be instantaneous. We played with a few different timeout values to try and get a good balance between convenience and excessive battery drain. In an ideal world, it would always be instant, of course!

Glad you're finding it useful otherwise :-)

Regards,

Eddy (Amulet Devices)

ajith

  • $upporter
  • Contributor
  • *****
  • Posts: 87
  • Karma: 2
    • View Profile
Re: Making VC listen and not listen, and adjust volume
« Reply #5 on: April 30, 2012, 01:17:11 PM »
Quote from: jitterjames link=topic=803.msg6459
Are you not able to access your VC folder from XBMC for some reason?
Well, not directly, as my XBMC is on the host Linux OS and VC is running inside Win 7 that is in turn running inside the VirtualBox VM software - two different machines for all practcial purposes.
The Win 7 in the VM can see the Linux host machine on a (virtual) network. So, I can map a shared folder on Linux within Win 7. Thus E: drive maps to a Linux folder.

So when I "XBMC.Send" a smart playlist, the path that I need to specify for the xsp should be a Linux path (since my XBMC is on Linux). Saving VoxSmart.xsp to E: drive would let me do this.

Quote from: jitterjames link=topic=803.msg6459
You can trying using File.Copy
Yes, this should do it. But I did something else that sort of clicked after your suggestion ... I moved VC's folder ( C:\VOXCommando ) itself to E:\ and ran it off of the new location :D
That solved the problem for me. It is great that VC's installation is location agnostic.

I learnt about the existence of File.Copy ... didn't know about it before!

Thanks and regards,
Ajith

ajith

  • $upporter
  • Contributor
  • *****
  • Posts: 87
  • Karma: 2
    • View Profile
Re: Making VC listen and not listen, and adjust volume
« Reply #6 on: April 30, 2012, 01:31:49 PM »
Hello Eddy,

Thanks for responding and nice to be talking to you :). I must thank you and Amulet Devices for bringing us the awesome Amulet Remote.

Quote from: eddyc link=topic=803.msg6460
... the RF link takes about 700ms to wake up from cold. Once it's awake, the response should be instantaneous. We played with a few different timeout values to try and get a good balance between convenience and excessive battery drain.

Any chance we might have a user-configuration option for this timeout, maybe an advanced tweak or something, a remote button key-sequence, perhaps, for users like me who almost exclusively use voice with the Amulet Remote. I'd be willing to forgo a little battery life in favor of getting a quicker wake-up response.


Thanks and Regards,
Ajith

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Making VC listen and not listen, and adjust volume
« Reply #7 on: April 30, 2012, 01:31:59 PM »
But I did something else that sort of clicked after your suggestion ... I moved VC's folder ( C:\VOXCommando ) itself to E:\ and ran it off of the new location :D
That solved the problem for me. It is great that VC's installation is location agnostic.
Cool, that would have been my next suggestion, based on your explanation of the relationship between the two OSs.

Yes, this folder portability is very important to me, and the reason I ignore silly people who complain about the fact that I don't use a standard windows installer.  Whenever I want to test something new, I just clone my whole folder, then I can mess about without any fear of doing damage to my set up.

I have about 30 VC folders scattered about on various systems in my house, keeping track of them is the tricky part. :)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Making VC listen and not listen, and adjust volume
« Reply #8 on: April 30, 2012, 01:34:46 PM »
Quote
Any chance we might have a user-configuration option for this timeout, maybe an advanced tweak or something, a remote button key-sequence, perhaps, for users like me who almost exclusively use voice with the Amulet Remote. I'd be willing to forgo a little battery life in favor of getting a quicker wake-up response.

I think he's talking about the time before it goes to sleep.  Once it went to sleep (after the timeout) the time to wake would still be the same.   One thing I do is I pick up the remote and move it while I am thinking about what I'm going to say.  This seems to wake it up part way and then when I lift it it seems to respond faster.

ajith

  • $upporter
  • Contributor
  • *****
  • Posts: 87
  • Karma: 2
    • View Profile
Re: Making VC listen and not listen, and adjust volume
« Reply #9 on: April 30, 2012, 02:11:45 PM »
Cool, that would have been my next suggestion, based on your explanation of the relationship between the two OSs.

Yes, this folder portability is very important to me, and the reason I ignore silly people who complain about the fact that I don't use a standard windows installer.  Whenever I want to test something new, I just clone my whole folder, then I can mess about without any fear of doing damage to my set up.
I'm 100% with you on this!

I have about 30 VC folders scattered about on various systems in my house, keeping track of them is the tricky part. :)
Tell me about it ... I already have several on the one VM. I can only imaging what it'll be like for you ... 


ajith

  • $upporter
  • Contributor
  • *****
  • Posts: 87
  • Karma: 2
    • View Profile
Re: Making VC listen and not listen, and adjust volume
« Reply #10 on: April 30, 2012, 02:20:04 PM »
I think he's talking about the time before it goes to sleep.  
Hmm ... in that case, I'd still like the timeout to be user-controllable. I'd probably increase it to a point where it is more than the average time interval between two voice commands so as to not let it time out, thus preventing the RF wake-up delay. Yes, battery life might be hit adversely if this is done, but I can live with that if it lasts one TV-viewing "session" which is at most one full-length movie or TV-show.

One thing I do is I pick up the remote and move it while I am thinking about what I'm going to say.
Yes, one quickly learns that trick with the Amulet Remote  :)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Making VC listen and not listen, and adjust volume
« Reply #11 on: April 30, 2012, 02:57:35 PM »
it should just be on all the time,  and solar powered >:D

ajith

  • $upporter
  • Contributor
  • *****
  • Posts: 87
  • Karma: 2
    • View Profile
Re: Making VC listen and not listen, and adjust volume
« Reply #12 on: April 30, 2012, 03:03:09 PM »
it should just be on all the time,  and solar powered >:D

One can only dream ...  :)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Making VC listen and not listen, and adjust volume
« Reply #13 on: April 30, 2012, 03:34:20 PM »
it should just be on all the time,  and solar powered >:D
Yes and a audio stream back to the remote with an audio output for use a headphone jack  ;)

Kalle
« Last Edit: April 30, 2012, 04:22:05 PM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Making VC listen and not listen, and adjust volume
« Reply #14 on: April 30, 2012, 04:52:07 PM »
And screw voice control. It should just read our thoughts.