Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - nime5ter

Pages: 1 ... 6 7 [8]
106
XML Exchange / Four Square
« on: November 15, 2013, 12:41:58 PM »
So, this is a command that I have fun with when I'm bored. It's kind of a 'serendipitous discovery' tool for the virtual tourist, but you could also use it practically.

The basic idea is: "Four Square, find popular X in [city] Y." Phrasing of your choosing, natch.

Look up microbreweries, museums, sushi joints -- whatever makes sense in the Four Square context.

VC scrapes Four Square and provides the top-rated Four Square results for destinations that I might want to check out. It then asks if I want to see the Four Square map to find out more. Usually I do.

I happen to like libraries. This morning I was introduced to the Canada Water Library in south-east London via my whimsical Four Square query ("Find popular libraries in London"), after which I looked up the history of the Canada Water district etc. Neat discovery for a Canadian!

If this sounds incredibly lame and uninteresting to you, try asking your better halves what they want to look up in the fantasy destinations of their choice, and then give the old Four Square command a go.  ;)

For this command:

I'm using two payload lists in order to improve recognition. You could also use payloadXML of course. In my case, I should probably do that because there's a character limit on payload lists, so I can't include all the cities I might be interested in. This is the kind of thing where you'd want to customize the lists to your own interests (within limits of Four Square's likely content).

I also cloned the command and created a new group, in which I swapped in payload dictation for the payload lists, but I gave that group a lower priority. This means that VC first tries to listen for recognizable payloads from my prioritized command that relies on the lists, and only if it fails at that will it try the free dictation route.

You can change a group's priority by right-clicking on the group's icon and editing its properties: http://voxcommando.com/mediawiki/index.php?title=Groups#Group_Properties

Below is the xml for just the prioritized Four Square group (because I'm lazy).

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.3.1-->
<commandGroup open="True" name="FourSquare" enabled="True" prefix="" priority="3" requiredProcess="" description="">
  <command id="481" name="Open four square" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch.OpenURL</cmdType>
      <params>
        <param>{Var.FourSquare}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Open four square</phrase>
  </command>
  <command id="490" name="Scrape" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>FourSquare</param>
        <param>https://foursquare.com/explore?mode=url&amp;near={2}&amp;q={1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.CreateTable</cmdType>
      <params>
        <param>FS_TopResults</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>https://foursquare.com/explore?mode=url&amp;near={2}&amp;q={1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>class="venueName"&gt;.*?&lt;a.*?&gt;(.*?)&lt;/a</param>
        <param>.  </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Map.Set</cmdType>
      <params>
        <param>FS_TopResults</param>
        <param>{i}</param>
        <param>{Match.{i}}, {2}</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>class="venueName"&gt;.*?&lt;a.*?&gt;(.*?)&lt;/a&gt;.*?venueScore.*?title\="(.*?)\"&gt;</param>
        <param>.  </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.MatchConcat</cmdType>
      <params>
        <param>.{CR}</param>
        <param>3</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.Replace</cmdType>
      <params>
        <param> - People</param>
        <param> people</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.Replace</cmdType>
      <params>
        <param>&amp;#39;</param>
        <param>'</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.Replace</cmdType>
      <params>
        <param>&amp;amp;</param>
        <param>and</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.Replace</cmdType>
      <params>
        <param>/</param>
        <param> out of </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>Top results: {CR}{LastResult}.</param>
        <param>10000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>The top Four Square results were: {LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>Would you like to see these on the Foursquare map?</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TellVox</cmdType>
      <params>
        <param>Open four square</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Four Square</phrase>
    <phrase>Find popular, Find me, Name some, Give me some</phrase>
    <payloadList>restaurants,libraries,museums,pubs,microbreweries,pool halls,billiard joints,brunch joints,cafés,Thai food,Indian food,Chinese food,Italian food,French food,food,sushi,pizza,vegetarian restaurants</payloadList>
    <phrase optional="true">in</phrase>
    <payloadList>Amsterdam, Berlin, Brussels, Budapest,Chennai, Chicago, Copenhagen, Delhi, Edinburgh, Frankfurt, Geneva, Glasgow, Hong Kong, London, Manchester, Marseille, Montreal, Moscow, Mumbai, Munich, NYC, Oslo, Paris, Prague,San Francisco,Stockholm, Tokyo, Toronto, Van</payloadList>
  </command>
  <command id="626" name="Find out more" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Map.Get</cmdType>
      <params>
        <param>FS_TopResults</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.OpenURL</cmdType>
      <params>
        <param>http://www.google.com/search?q={LastResult}&btnI</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Tell me more about, Find out more about, Google</phrase>
    <phrase>Four Square result number</phrase>
    <payloadRange>1,5</payloadRange>
  </command>
</commandGroup>

cheers

EDIT: I've updated this command group to include a new "Find out more" command. You can now do a Google lucky search for any of the top Four Square results. This uses VC's nifty maps feature. http://voxcommando.com/mediawiki/index.php?title=Maps

May 2014 edit: The Four Square site's html has changed since my initial post. I've updated the regex in the XML of the Scrape command above, so it should work again. This is something you may have to do periodically. If you're having trouble figuring out the regular expression pattern yourself, feel free to ask for help.

107
Kodi (XBMC) Frodo / Gotham / Isengard / Jarvis / XBMC radio add-on?
« on: October 10, 2013, 11:20:22 AM »
Is anyone here using the Radio music plugin for XBMC? (http://forum.xbmc.org/showthread.php?tid=119362)

Apparently, the plugin gives easy access to any of the radio broadcasts powered by the websites http://www.radio.de (German), http://www.rad.io (English), and http://www.radio.fr (French).

If you are using it, have you made any custom VC commands for it?

108
General Discussion / French forum support and XML sharing?
« on: September 06, 2013, 11:55:52 AM »
Question for French-speaking VoxCommando users:

Do you think it would be worthwhile to have a French-language support and discussion forum here, as we already have for German and Brazilian Portuguese?

If so, is anyone interested in being the French moderator? (I don't think it would be too much work. James and I can also assist.)

109
XML Exchange / Check flight status
« on: August 20, 2013, 01:59:31 PM »

**COMMAND XML UPDATED 28-JAN-2015** (some update notes further down in this thread)

This command group uses the RoboBrowser plugin and regular expressions (RegEx) to find and announce updated flight status info from Google.

- Initial response provides basic flight status data. "On-time - departs in 37 minutes" type of thing.
- "More flight info" provides details about arrival and departure times. (VC will automatically ask you if you want to hear this information after providing flight status info. This can of course be changed.)
- You can also ask if there is any gate information available.
- NEW as of 2015-Jan: you can ask to be updated on flight status later in the day (in 1h, 2h, at departure time, at arrival time, dinner time etc.).

The attached airlines.xml payload xml file lists some common airlines. Edit to your own needs.

Both the payload files: airlines.xml and flight_updatetime.xml go in your payloads folder.



110
I've been using VC on my laptop for a while now, usually using the built-in mic. For ordinary uses (like Skype) I've usually had to turn up my input levels to get people on the other end to hear me, but it's clear now that VC has different needs. It was picking up everything, and I was getting a lot of false positives.

James suggested that I try testing the levels by turning the input *way* down. I turned it down from 70 (already a lower input than I used to need) to 10 -- this has resulted in a *major* improvement in the accuracy level. So far, it's working perfectly -- understanding what it's supposed to and ignoring random utterances or background noise. (Granted, I live in a quiet home.)

If you're experiencing issues like this, I highly recommend trying this: start low, and increase if that doesn't work, rather than the other way around.

111
XML Exchange / Open different news websites using payloadXML
« on: June 22, 2013, 11:05:57 AM »
This example might be useful for newer VC users. I've created a command group in which I can browse to different news websites in Chrome.

I created a payload XML file in which I've mapped URLs to phrases. This group also includes very basic Chrome navigation -- close a Chrome tab or close the program itself.

Below is the code. The payload XML file "news.xml" is attached. You'll need to download the file and put it in your payloads folder for the News command to work properly.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Chrome" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="427" name="News" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch.RawParam</cmdType>
      <cmdString>{Path.PFx86}\Google\Chrome\Application\chrome.exe&amp;&amp;{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Show news from, Show me, News from</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone">payloads\news.xml</payloadFromXML>
  </command>
  <command id="444" name="Close Chrome" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Window.Close</cmdType>
      <cmdString>Chrome</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Close Chrome</phrase>
  </command>
  <command id="450" name="Close tab" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Window.Focus</cmdType>
      <cmdString>Chrome</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <cmdString>{CONTROL}({W})</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Close tab</phrase>
  </command>
</commandGroup>

NOTE: If Chrome is your default browser you can use the Launch.OpenURL action rather than Launch.RawParam. Then you don't need to specify the path to Chrome. (It's a good idea to experiment with the different launch actions to see which does what.)

112
XML Exchange / Search Wikipedia
« on: May 27, 2013, 09:47:48 AM »
This is a simple command for searching Wikipedia using Dictation.
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="279" name="open wikipedia" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Launch.OpenURL</cmdType>
    <cmdString>http://en.wikipedia.org/wiki/{1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>search wikipedia for</phrase>
  <payloadDictation>payloadDictation: Regular</payloadDictation>
</command>

113
In your native language, what word or phrase do you use to describe a person who regularly reads forum posts and knows what is happening in a particular online community, but doesn't actively post or contribute content to a forum?


(In English we refer to "lurkers" -- that is, they are people who lurk ...)

This question is just idle curiosity, based on a conversation I'm having somewhere else.

Thanks!


114
Tutorials / Installing VoxCommando 0.980 for use with XBMC Frodo (video)
« on: January 28, 2013, 06:03:43 PM »
This 14-minute video tutorial includes close captioning (subtitles). If you like, you can try using YouTube's auto-translate feature while watching the video:

http://youtu.be/O-9QNjEdNhI

Pages: 1 ... 6 7 [8]