Author Topic: Just discovered voxcommando - very impressed..however...  (Read 2746 times)

0 Members and 1 Guest are viewing this topic.

kRAyZZed

  • Jr. Member
  • **
  • Posts: 3
  • Karma: 0
    • View Profile
Just discovered voxcommando - very impressed..however...
« on: September 01, 2011, 06:17:28 PM »
Hi all,

I just started using the trial version of voxcommando - and I am very very close to purchasing a license, as it 'almost' does everything I want - however before I did I had a couple of questions / requests that one of you could hopefully help me out with.

I played around with the code builder and wrote a script that would when watching a movie - if I said "who plays Thor" it would query xbmc's database and return the name of the actor who plays him and via TTS say it aloud - my only problem is that the GenXML does not add actorroles table from the databases - just actor names.

Is there a way I can manually add this? I would love to setup a 'trivia' script of sorts based on my movie and tv show library - this would be a nice addition to my home cinema and would give a really neat effect to my media centre :D.

The other quick question I had was, can someone recommend a relatively cheap omnidirectional microphone? At the moment during testing I am using a headset and that works great but it would be nice to have something that I can just rest on top of the tv and be done with it. Would a Kinect do the job?

I am happy to share the script I wrote in the code builder, as soon as someone can tell me how I can export to xml to post :D.

So far the way it works is its gets the movie name from xbmc.send currentlyplaying - then uses that name to query the database and gets the movieid from that, then it runs a query that returns the actor name for the movieid currently playing AND the payload string - which if I can get roles added to the database would be fairly accurate.

It works great at the moment when I test it and type in the payload string - it just does not seem to ever recognise the payload string when I say it - eg Loki, or Thor characters in the movie Thor always comes up with something different - like the number 4.

Thanks for reading this

~kRAyZZed

kRAyZZed

  • Jr. Member
  • **
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Just discovered voxcommando - very impressed..however...
« Reply #1 on: September 01, 2011, 06:30:40 PM »
Managed to find the xml - so far the only 3 additions I have done are the following

1) A script that you can ask for the shortplot of the movie
2) A script that you can ask who directs the movie
3) A script that you ask who plays a specific character (this is the one that I need to have a 'characters' or 'roles' xml for exported from my database so that vox picks up on them better :D


<commandGroup name="XBMC Get Movie Info" enabled="True" prefix="" priority="0" requiredProcess="" description="">
        <command id="245" name="Plot short" enabled="true" alwaysOn="False" confirm="False" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>XBMC.Send</cmdType>
                <cmdString>getcurrentlyplaying</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Results.RegEx</cmdType>
                <cmdString>Plotoutline:(.*)</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>TTS.SpeakSync</cmdType>
                <cmdString>{match.1}</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>what is the plot, movie plot, plot of this film, plot of this movie</phrase>
        </command>
        <command id="261" name="director" enabled="true" alwaysOn="False" confirm="False" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>XBMC.Send</cmdType>
                <cmdString>getcurrentlyplaying</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Results.RegEx</cmdType>
                <cmdString>Director:(.*)</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>TTS.SpeakSync</cmdType>
                <cmdString>This movie is directed by {match.1}</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>who directs this, who directed this</phrase>
        </command>
        <command id="258" name="who plays" enabled="true" alwaysOn="False" confirm="False" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>XBMC.Send</cmdType>
                <cmdString>getcurrentlyplaying</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Results.RegEx</cmdType>
                <cmdString>Title:(.*)</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>XBMC.Send</cmdType>
                <cmdString>queryvideodatabase(select idMovie from movie where c00="{match.1}")</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Results.RegEx</cmdType>
                <cmdString>&lt;field&gt;(.*)&lt;/field&gt;</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>XBMC.Send</cmdType>
                <cmdString>queryvideodatabase(select actors.strActor from actors, actorlinkmovie where actorlinkmovie.idMovie={match.1} and actorlinkmovie.strRole="{1}" and actorlinkmovie.idActor=actors.idActor order by strActor desc)</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>TTS.SpeakSync</cmdType>
                <cmdString>{lastresult}</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>who plays</phrase>
            <payloadDictation>payloadDictation: don't edit this</payloadDictation>
        </command>
    </commandGroup>

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Just discovered voxcommando - very impressed..however...
« Reply #2 on: September 01, 2011, 06:48:35 PM »
Hi all,

I just started using the trial version of voxcommando - and I am very very close to purchasing a license, as it 'almost' does everything I want - however before I did I had a couple of questions / requests that one of you could hopefully help me out with.

I played around with the code builder and wrote a script that would when watching a movie - if I said "who plays Thor" it would query xbmc's database and return the name of the actor who plays him and via TTS say it aloud - my only problem is that the GenXML does not add actorroles table from the databases - just actor names.

Is there a way I can manually add this? I would love to setup a 'trivia' script of sorts based on my movie and tv show library - this would be a nice addition to my home cinema and would give a really neat effect to my media centre :D.

The other quick question I had was, can someone recommend a relatively cheap omnidirectional microphone? At the moment during testing I am using a headset and that works great but it would be nice to have something that I can just rest on top of the tv and be done with it. Would a Kinect do the job?

I am happy to share the script I wrote in the code builder, as soon as someone can tell me how I can export to xml to post :D.

So far the way it works is its gets the movie name from xbmc.send currentlyplaying - then uses that name to query the database and gets the movieid from that, then it runs a query that returns the actor name for the movieid currently playing AND the payload string - which if I can get roles added to the database would be fairly accurate.

It works great at the moment when I test it and type in the payload string - it just does not seem to ever recognise the payload string when I say it - eg Loki, or Thor characters in the movie Thor always comes up with something different - like the number 4.

Thanks for reading this

~kRAyZZed
Welcome to VC-Forum.
I can tell you something for a good mic - there is no cheap open mic (arraymic) on market who work awesome with speechreg and permanent backround voices (musik, movie etc.) Take a look here http://voxcommando.com/mediawiki/index.php?title=Microphones  many information what mic is the best solution for VC.
In the command tree of vc, you can right click on a command group and there is a option to export group, so you can post here the attach

Kalle
« Last Edit: September 01, 2011, 06:57:27 PM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Just discovered voxcommando - very impressed..however...
« Reply #3 on: September 01, 2011, 09:31:49 PM »
yes, please  export a group with your new commands in it and upload it here.  For the commands that are still not working it will still help to upload it so that I can better understand what you are trying to do. Uploading the xml as text is OK but it is much easier to have an xml of an exported group file that I can import simply by dragging it into VoxCommando's tree editor.

also welcome to VC!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Just discovered voxcommando - very impressed..however...
« Reply #4 on: September 01, 2011, 11:18:17 PM »
Your Roles command looks good.  I will add "roles" to the next version of VC.

In the mean time you can create your own payloadXML file if you want by copying and pasting.  Use SQLiteSpy to open your xbmc database.  copy all the rows from the 'actorlinkmovie' table.

paste into excel

copy the two columns you want, not including the headers.  (say idactor and strrole).  strrole must be on the right so that it will end up in the phrase column.

in VC create a new empty payloadXML file.

Set it to "Phrase Only"
Edit it.
Right click the row selector on the left and "choose paste rows from clipboard"
(optional: click "submatch all" at the bottom right of the payload editor)
Save As and put it where you want.

see attached.  I know this is not a good long term solution, but it's a good exercise anyway in case you need to do it with something else.
« Last Edit: September 01, 2011, 11:21:12 PM by jitterjames »

kRAyZZed

  • Jr. Member
  • **
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Just discovered voxcommando - very impressed..however...
« Reply #5 on: September 02, 2011, 01:54:37 AM »
Thank you so much!, that was exactly the option I was looking for - feel a bit silly now for not realising to use a custom payload in the command builder lol.

I run a MySQL database for xbmc instead on my setup, so I can just use phpmyadmin to grab the info I need and create the custom payload :)

I will take a look at it when I get home from work tonight :) - (I would do it now but it's 5:50am and I am already on the train to work **sigh** )

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Just discovered voxcommando - very impressed..however...
« Reply #6 on: September 06, 2011, 07:08:35 PM »
I've added something that will interest you in the new version 0.901

http://voxcommando.com/forum/index.php?topic=590.0

It's not yet part of Generate-All so you will need to open the GenXML form.  Take a look at the bottom of the XBMC tab...