VoxCommando

Help and Support (Using VoxCommando) => XBMC (Old board see 'KODI' above) => Topic started by: jitterjames on September 24, 2010, 09:47:10 PM

Title: (outdated thread) Better control of XBMC with 0.821
Post by: jitterjames on September 24, 2010, 09:47:10 PM
A demo of the latest version of VoxCommando (0.821) controlling XBMC  (in english)

Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 24, 2010, 09:50:16 PM
I had to snip out some bits of audio because Youtube and WGM were muting my sound based on some stupid copyright claim.
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 25, 2010, 12:39:51 PM
see the attached xml file for the commands used in the video, and a few more...

you can replace your voicecommands.xml with this file if you want, or you can drag this file onto your tree edit window to import and merge it.
Title: Re: Better control of XBMC with 0.821
Post by: Native on September 25, 2010, 05:40:05 PM
..sorta works for me, using your xml commands, vox hears the correct phrase, and for basic commands it executes the action, but for "play movie" "find movie" "play artist" or song or anything of that nature, whilst the phrase is detected, nothing happens on xbmc. Vox log says something about the request timing out.

On a side note, i noticed that your video implies you'll begin charging for VC soon?
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 25, 2010, 05:55:48 PM
..sorta works for me, using your xml commands, vox hears the correct phrase, and for basic commands it executes the action, but for "play movie" "find movie" "play artist" or song or anything of that nature, whilst the phrase is detected, nothing happens on xbmc. Vox log says something about the request timing out.

On a side note, i noticed that your video implies you'll begin charging for VC soon?

A couple of things.

- First you have to make sure that you have enabled the xbmc web server and got the settings matched in XBMC and VoxCommando Options.  If you are running xbmc on the same machien you can leave the ip address as 127.0.0.1 otherwise you need to enter the IP.  If basic commands are working for you then I guess you probably have that set up correctly.

- You need to use GenXML to create data for your media libraries.  Make  sure XMBC is running and then click GenXML in VoxCommando, and click on all the XBMC buttons.  If Vox is able to contract XBMC correctly then the text next to the button should change from "ready" to "found ###" indicating how many items you have for that category.

Then you need to restart VoxCommando to reload the data.

If that doesn't work then post back here and we'll try to figure it out.

edit: yes, I think I'll start charging soon, but not a huge amount.  Maybe $30.  I will probably start with an honour system, and just suggest people make a donation of that amount.  I don't really want to deal with registration codes etc. at this point.
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 25, 2010, 05:58:36 PM
also better make sure you have the latest.  See the attached file.
Title: Re: Better control of XBMC with 0.821
Post by: Native on September 25, 2010, 06:10:43 PM
..the web-server seems to be working for the simple stuff, all the settings are correct at least.
The generating of the xmls went all ok after i'd set the webserver running, and according to the log Vox loads them up ok.
Restarted plenty of time, mainly because xbmc stops responding quite often when i minimise it for too long, also it stop responding to keyboard presses after VC has interacted with it sometimes too.
Here's a copy of the log.. some strange looking stuff i noticed is the "play artist XXXX = do command "tvshow", buy i'll let you figure it out ;)
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 25, 2010, 06:47:25 PM
before I try to figure this out can you please use version 0.821 that I attached in my previous post.  The log indicates that you are using 0.82.  Is that correct?
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 25, 2010, 06:55:55 PM
also, please make sure that you don't have "create artist grammar" or "create album grammar" checked in the VC XBMC options tab.

EDIT: after looking at your log file I think this may be the problem.
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 25, 2010, 07:02:20 PM
I'm not sure if it matters but this is the version of XBMC that I'm using:

http://mirrors.xbmc.org/nightlies/win32/xbmc-r33778-Dharma_beta2.exe
Title: Re: Better control of XBMC with 0.821
Post by: Native on September 25, 2010, 07:53:16 PM
Will give it a try tomorrow, past my bedtime currently   ^-^
Title: Re: Better control of XBMC with 0.821
Post by: Native on September 26, 2010, 07:46:44 AM
That nailed it, either the unchecking grammar options or the new .exe.  Thanks mucho  ;D
Now i just have to buy a real microphone (as opposed to the £3.95 one i have)
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 26, 2010, 10:40:17 AM
that's always a challenge.  I have about 5 different mics that I use and they all work reasonably well, but none is perfect.  For me the ultimate solution would be something small and comfortable like a bluetooth mic, but with quality approaching that of a noise cancelling wired headset.

Depending on the quality of your inputs, many people get better results with a USB microphone.  The ps3eye is pretty good as an option because it is a cheap array microphone.  It is not fantastic, but it is what I used for the demo.  You will notice, that my voice sound pretty quiet in the video.  Also, I have to unplug it every couple of days to reinitialize it for some reason.

My wireless Plantronics 995 wireless headset is the best quality mobile solution that I own, but it is a big headset that covers my ears so it's not really practical in most situations... and it's not very comfortable.

I had really high hopes for the Plantronics CS-55 but it turned out to be totally useless with terrible sound quality. I think maybe I got a lemon, but it was really expensive and only available by mail order so I sent it back and moved on...

I'm sure you've already noticed it, but here's an area for mics: http://voxcommando.com/forum/index.php?board=8.0
Title: Re: Better control of XBMC with 0.821
Post by: Native on September 26, 2010, 01:13:00 PM
The Amazon reviews of the logitech desktop usb mic are very positive, and it's not a lot of money to waste on trying, so i think i may give that one a whirl. Cheaper than the voicetracker at any rate. Ideally tho', i think we'd all like wireless.

With regards to controlling xbmc, would it be possible to search/play tv show episode by name and/or number, for example "play Glee season 2 episode 1"  or "play Glee S02E01", or maybe some kind of first episode marked as unwatched. "play Glee first unwatched" or "play Glee new episode" . 
 On the same note, how would i go about making custom xbmc commands, the activate window stuff i see in the built list, or is that your job? I actually know nothing about the coding under the hood of xbmc, so really, i'm being very optimistic that i even could create anything, but i'm big on trial and error before i totally give up.
Great work you do, keep on keeping on :)
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 26, 2010, 01:55:04 PM
The Amazon reviews of the logitech desktop usb mic are very positive, and it's not a lot of money to waste on trying, so i think i may give that one a whirl. Cheaper than the voicetracker at any rate. Ideally tho', i think we'd all like wireless.

the logitech desktop usb mic will probably work very well if you are within 3/4 feet of it and you have a quiet environment.  If you want to be able to play loud music and watch movies etc. then you'll probably need to be able to press a button to:
--  mute  -- switch vox on  -- issue a command   -- and then automatically switch vox off and restore volume.
If you have a remote you can do this by using eventGhost.
If you get it, let us know what you think.

With regards to controlling xbmc, would it be possible to search/play tv show episode by name and/or number, for example "play Glee season 2 episode 1"  or "play Glee S02E01", or maybe some kind of first episode marked as unwatched. "play Glee first unwatched" or "play Glee new episode" . 
 On the same note, how would i go about making custom xbmc commands, the activate window stuff i see in the built list, or is that your job? I actually know nothing about the coding under the hood of xbmc, so really, i'm being very optimistic that i even could create anything, but i'm big on trial and error before i totally give up.
Great work you do, keep on keeping on :)
technicallly yes, but it's tricky, and probably not that practical since you may not know which episode you want to watch anyway.  Auto playing the next unwatched episode is of interest to me though, and I will try to figure it out.  I am also not an expert with XBMC.  I would love to get someone onboard that knew XBMC inside and out.

As for modifying / making your own commands.  That's really the main concept behind VoxCommando!  For starters, you can make a copy of your whole VC folder so that you can experiment without having to worry about killing a good setup.

Then click Edit on the main interface and poke around.  The easiest thing you can do is simply change the phrases in the command tree to use words that you want for the existing commands, and to delete commands that you know you will never use.  If you screw up, just restore your backed up folder, or even just your voicecommands.xml file.

I need to start a new series of tutorials that are more up to date, but you can get an idea by watching the old ones:
http://voxcommando.com/forum/index.php?topic=45.0

also, I've started working on the wiki which details the various elements of the command tree etc... It's not finished by any means but it's a good starting point.

http://voxcommando.com/mediawiki/index.php?title=How_to_use_VoxCommando
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 26, 2010, 01:57:43 PM
to better understand the command actions and the possibilities with xbmc you can refer to this as a starting point:

http://wiki.xbmc.org/index.php?title=Web_Server_HTTP_API
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 27, 2010, 01:32:17 PM
Quote
With regards to controlling xbmc, would it be possible to search/play tv show episode by name and/or number, for example "play Glee season 2 episode 1"  or "play Glee S02E01", or maybe some kind of first episode marked as unwatched. "play Glee first unwatched" or "play Glee new episode" . 

I have just had a brainstorm that will allow us to do this and much more.  Stay tuned!!
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 29, 2010, 09:26:01 AM
here's a tutorial (advanced users only) on using VoxCommando to create smart playlists in xbmc using payloads.



And here's a demo using this feature with XBMC (among others).

It also shows off the beautiful new Aeon MQ skin that Wanilton introduced me to.


Title: Re: Better control of XBMC with 0.821
Post by: abom on September 29, 2010, 08:03:28 PM
Love the new features! That XML files makes it pretty clear how to use everything. I wonder if it is possible to get it to work with 'play song <song title> by <artist>'. I'm going to play with it tomorrow and see what I can get working with it.

Now I need a way to get a decent mic connected to my Mac Mini (which only has a Line-In).
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 29, 2010, 09:16:28 PM
sounds like a good goal.  Post your key files back here when you get something working.

Mac Mini?  Are you running Windows on it?

You could always plug in a USB mic no?  Otherwise you need a preamp.  I use studio mics with a preamp in my office and it works great, but it's all a bit bulky...

I'm still dreaming of the samson airline micro... http://www.samsontech.com/products/productpage.cfm?prodID=2045&brandID=1
Title: Re: Better control of XBMC with 0.821
Post by: Wanilton on September 29, 2010, 10:54:05 PM
James,

Criei um Smart Playlist para
'play song <song title> by <artist>
atached file...

Agora como construo um comando para  que atenda a frase acima, usando {1} {2} receba os valores corretos neste caso, onde {1} Song {2} Artist

Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 29, 2010, 11:35:06 PM
the only problem with this (I think) is that it will introduce a lot of extra load time, and memory consumption if you have a large music library.
Title: Re: Better control of XBMC with 0.821
Post by: abom on September 30, 2010, 07:43:16 AM
Yes I am running Windows 7 on my Mac Mini. I love OSX and used to work with Plex (based on XBCM). But I use too many Windows-only applications that I kinda was forced to move to Windows/XBMC.

Regarding the song by artist script, I do have a big music collection. I don't really mind about load time or memory consumption, unless it's ALOT, will have to try. But performance is a little but of an issue.

When it comes to mic's, I would like to have a 'room' mic, not something you would have to wear. My new living room is almost finished and that's where my HTPC will be located (hidden), so I would like the same for the mic. Most of the time I use the remote anyway, but it's really nice to be able to name an artist or song, so I don't have to browse through my music collection.

I have a question, why do you use action(#) over for example PlayerControl(Stop) ? Is Action faster?
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 30, 2010, 09:08:10 AM
try it out.  Another problem with load song X by artist Y is that there will be no real intelligence behind it.

If you have the song Smoke on the Water in your Collection, and also have some songs by ABBA, then it would let you say

Play Smoke on the Water by ABBA, and then of course the 'smart' playlist would return nothing. :bonk

I would need to write special code that knew what all the songs were for each artist and create special grammar based on that.  As it is, as long as you speak clearly and your mic hears you it will still work.

Of course the other option is simply to say play song "blah" and then the smart playlist will return all versions of that song (hopefully there won't be TOO many) and you can just scroll down.

a popular choice for an inexpensive open air usb microphone would be the ps3eye.  It's not exactly fantastic, but pretty good for $40.  Depending on where your htpc is you'll probably want a usb extension cable.  Try to get the mic within a few feet of where you usually sit, if that is possible.

Also, you'll probably want to rig something up with a remote so that you can mute your stereo and switch vox on with one button, and then restore sound after your command and switch vox back off... Unless you listen to your music very quietly...  This can be done with EventGhost, or possibly you could use tellvoxcommando if you remote software lets you call executables
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on September 30, 2010, 09:16:03 AM
also, after you have loaded all songs of a certain name, you may be able to use the command

SetPlaylistSong(position)

to jump to a song and start playing it.  I haven't tried it, and I don't exactly know if it works with smart playlists.  Also I don't know if you would have to execute a play command afterwards or what... let me know if you figure it out.
Title: Re: Better control of XBMC with 0.821
Post by: Native on October 01, 2010, 07:32:37 PM
Nice to see everyone keeping busy :) 
Just finished my new system build, so come Sunday i should have some time to play with the new xmls

Also saw your thread with regard to the json-rpc stuff over on the xbmc forum JJ, to quote "Awesome. That alone would make it totally worth the effort of recoding my app to use JSON! ".   Care to share any details?

Most of this stuff goes wayyyyy over my head.

One idea i thought i'd mention; Would it not be possible to use VC to build VC command trees/xmls/add parameters etc? In short, use the current VC to build it's successor?
..but then, it may get too intelligent, and not need you any more i guess    :o
Lol, anyways, just checking in, keep on keeping on.
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on October 01, 2010, 07:49:53 PM
Busy is a good word.  The devil makes work for idle hands.

In that thread, talking about the JSON, I was referring to the potential ability to write code (call it an addon) that runs IN xbmc.   There is a lot of stuff that could be done there.  Currently, if I were to write such code, I would have no way of calling it or passing it parameters.  If I could it would open up some nice opportunities.  One that I would like to be albe to do, is to be able to display custom information within xbmc using the xbmc windows and graphical elements.

As for your other idea, what are you crazy?  Didn't you see Superman 3?  Or Terminator?  Or Wargames? Or The Matrix?  I could probably go on all day... but I won't.  >:D

Thanks for checking in.  I'm sure we'll make contact again once your new system is ticking away.  :D

Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on October 01, 2010, 08:15:53 PM
Oh, by the way I won't be around Sunday or Monday so if I don't answer questions right away it's not personal!
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on October 01, 2010, 08:35:13 PM
I have a question, why do you use action(#) over for example PlayerControl(Stop) ? Is Action faster?

I just noticed this question.  I don't know if I missed it the first time or if you edited your original post.  Anyway the answer is, I use whatever works!  There may be some subtle difference between the two commands, I'm not sure.  I feel like there may have been situations where the PlayerControl(stop) didn't work for me, but I don't remember.  There is always more than 5 ways to skin a cat.

the http interface kind of evolved along with XBMC over time, so it's a bit disjointed.  The way different commands are broken up is not really logical.  I think it just kind of happened.  Hopefully the new JSON interface will make things less confusing, but for now it is still being developed so don't expect a switch over for a little while yet.  JSON is not even supported in the last "stable" build of XBMC (9.1), though it is in Dharma beta 2, which is plenty stable as far as I can tell.
Title: Re: Better control of XBMC with 0.821
Post by: abom on October 07, 2010, 04:32:39 PM
Some things I added and find very useful are:

- Toggle watched (execbuiltin(SendClick(14))). This enabled/disabled 'Hide watched' option, showing and hiding watched TV shows or movies. I use this alot.
- Scan new video (execbuiltin(XBMC.UpdateLibrary(video))). This scans all TV Show and Movie shares for new stuff. You can fine tune this to 'scan tv shows' or 'scan movies', but I haven't found the syntax for the <path> variable.
- Scan new music (execbuiltin(XBMC.UpdateLibrary(music))). This scans for new music.
- Party Mode (execbuiltin(PlayerControl(PartyMode(music)))). This simply starts music party mode.

I liked the 'Toggle subtitles' command you added, eventho I rarely use subtitles, it might come in handy.

I am still looking for a command to toggle from small windows to full screen, so you can get to your Windows desktop. The same function as the back-slash-key (\) on the keyboard.

I got a temporary mic and it's working really well. Its from the Microsoft LifeCam Cinema and it uses some kind of audio filter to cancel out audio playing by the PC. This works really well when I'm playing music, I can set the volume as loud as my voice and it still picks up what I say. Unfortunately, this doesnt work TV shows and movies because they all have digital audio, which is send straight through my receiver. I will probably use your idea, mapping a button on my remote to pause and pay attention, by using EG.

Right now I am running 0.821 and it seems to be having some stability issues. Sometimes it will hang for a while and sometimes it will stop listening to the Mic, I have to be honest, I am not sure if it is Mic related or related to VC.

Can I make a request? :) Can you add 'genre' to the GenXML feature, so we can work with that? I either play party-mode, an artist or a specific genre.
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on October 07, 2010, 04:45:17 PM
Those sound like very good additions, would you be willing to put them all into a group and then export it (right-click the group to export) and then upload here so that we can import it to our command trees easily?

I will add XBMC Genre to GenXML.  In the mean time you can always use a payloadList with your favourite genres entered by hand.

I actually need to get more organized and create some kind of feature request page, because I am forgetting the ones that I don't get to right away!  I wonder if there is something ready-made for dealing with this?  I have seen it on other "bigger" project sites like xbmc.

I think there may be a minimize command under execbuiltin...  or you could use sendinput to send a keyboard backslash \ if you are running VC and XBMC on the same computer.  If not you may still be able to use an http method of sendkeys.  You just need to figure out the key code...

its something like SendKey(0xF0##)

where ## = ascii keycode.
Title: Re: Better control of XBMC with 0.821
Post by: abom on October 13, 2010, 03:30:02 PM
Haven't been on the forum recently.

Here are the command's I added and find useful myself.
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on October 13, 2010, 06:21:04 PM
thanks, I'll add these to the next xbmc package.
Title: Re: Better control of XBMC with 0.821
Post by: painy on November 18, 2010, 01:18:44 PM
Found a small 'bug'

Say you pause a video in XBMC and it goes into 'power saving' mode after a couple of minutes of not doing anything (xbmc fades out the brightniess with like 50% and the screen becomes much darker).
When you give XBMC the 'play' command with VOX, the video starts playing in power saving mode (with a much darker picture) and you have to move your mouse or press a keyboard botton for it to become active again
Title: Re: Better control of XBMC with 0.821
Post by: jitterjames on November 18, 2010, 01:52:38 PM
Found a small 'bug'

Say you pause a video in XBMC and it goes into 'power saving' mode after a couple of minutes of not doing anything (xbmc fades out the brightniess with like 50% and the screen becomes much darker).
When you give XBMC the 'play' command with VOX, the video starts playing in power saving mode (with a much darker picture) and you have to move your mouse or press a keyboard botton for it to become active again

That sounds more like a bug in XBMC.  I think you are referring to the screensaver "dim" feature in xbmc.
Others have had this problem when not using VoxCommando:  http://forum.xbmc.org/showthread.php?p=564448

Try changing your screen-saver options in XBMC.  Or maybe you can undim it with a sendkeys command, or using mouse emulation.