Voice to OmniFocus, revisited

9/2/2009 Updated to work with now longer Twitter ID numbers

back when Jott was free I was one of several people who were using it to get quick voice notes into OmniFocus (OF). A couple of limitations of the Jott solution was that:

  • It sometimes had trouble understanding the recipient of “who I wanted to Jott”
  • You never got a chance to proofread or edit the transcription before it got sent

There are just times when I think of something on the go, and firing up the iPhone OF app and tapping it in won’t work, so when a friend told me about vlingo for iPhone and twitter, I thought – hmm I’ve been playing a bit with the twitter API and that might be a good route for me to get stuff from voice into OF.

So here are the steps (updated with more detail):

  • Set up a new twitter account – make it “private” (assuming you don’t want to world to see your tasks)
  • Set up vlingo to post status updates to this twitter account (obvious caveat, you won’t be able to use vlingo for your regular twitter account…)
  • download the python script (Click on the link, then do a save as, from here we will assume its on your Desktop, but it is quite likely you may want to keep it somewhere else)
  • Rename it oftwitter.py (mind os x’s habit of hiding extensions…)
  • open the script in any text editor and set the username and password settings to those of your new account
  • open terminal and type the following lines (you will need your admin password)

    chmod +x ~/Desktop/oftwitter.py
    sudo easy_install appscript
    sudo easy_install twitter
    

you will get a warning about a C extension not being compiled, but you can ignore that.

  • Now assuming you have already logged some tweets to the twitter account, try it out by typing the following into terminal:

    ~/Desktop/oftwitter.py
    

You should see your tweets as items in your OmniFocus inbox

The script creates a preference file stored at ~/Library/Preferences/com.ptone.oftwitter.plist that stores the most recent tweet and uses that to query twitter more effectively.

to set up automated retrieval of new tweets install Lingon and configure a new launch agent to look something like this:

Oftwitterlingon

Now when you are out and about you can fire up vlingo on the iPhone and say: “twitter, order new engine for rocket ship”, you get the chance to fix any quick errors, then update your status. I’m finding it even easier to just hit the “social” button in vlingo, then you don’t have to say “twitter” – just your task.

When you return to your Mac – it should shortly appear in your OF inbox. This script assumes you keep OmniFocus open

A couple other goodies:

  • If you say “important” or “flag”, that word will be stripped, and the entry will be flagged in OF
  • you can send a @reply message to the twitter account and replies are checked too (with the leading @user stripped from the start)
    • This is handy if you want to give someone a way to submit tasks to your inbox, they can just send a tweet to your new account

To remove all traces:

  • delete the oftwitter.py script file
  • delete ~/Library/Preferences/com.ptone.oftwitter.plist
  • delete /Library/Python/2.5/site-packages/appscript*
  • delete /Library/Python/2.5/site-packages/simplejson
  • delete /Library/Python/2.5/site-packages/twitter

13 comments ↓

#1 OmniSupportGuy on 03.11.09 at 7:01 am

Wow. Very cool, and I think this is going to be pretty popular.

#2 Toby Jones on 03.11.09 at 7:44 am

OK the first two steps were easy – can we get a breakdown for us chumps on the third part? Foxed me I’m afraid.

#3 Lon Seidman on 03.11.09 at 7:57 am

Very cool concept, eager to give this a shot. Can you walk us through configuration? I was able to install the modules but still getting an error when executing the script.

#4 Rob Rainthorpe on 03.11.09 at 8:22 am

Cool hack.

Installs okay (although I needed to setup setuptools using a specific version : sudo easyinstall http://www.jaraco.com/ASP/eggs/setuptools-0.6c8svn15fix.egg to avoid a missing egg problem).

However, vlingo isn’t really up to the job with my voice. Probably quicker to use Tweetie directly. Talk slowly, talk quickly, with a gap between words, without a gap between words, end result is appalling accuracy.

#5 Dr. Drang on 03.11.09 at 9:07 am

You could also use Dial2Do (http://www.dial2do.com) to send tasks to your private Twitter account. I’m pretty sure that it, like Jott, uses human transcription.

When Jott-to-email stopped being free, I switched to Dial2Do and have been dictating tasks to it ever since. My system relies on a modified version of the Mail filter that comes with OF, which is described here

http://www.leancrew.com/all-this/2008/08/dial2do-and-omnifocus/

and little setup in the Dial2Do account, described here:

http://www.leancrew.com/all-this/2008/10/omnifocus-command-for-dial2do/

I’ve found Dial2Do’s transcriptions to be plenty accurate for my purposes. I keep expecting it to go the way of Jott, but it hasn’t yet.

The disadvantage of a Mail-based system is that my main computer has to be running Mail all the time. Switching to your Twitter-based system would eliminate that requirement.

#6 robert on 03.11.09 at 4:48 pm

how do I solve this error msg. from terminal:

Traceback (most recent call last): File “/Users/randy/Desktop/oftwitter.py”, line 51, in from twitter.api import Twitter, TwitterError ImportError: No module named twitter.api

#7 ptone on 03.11.09 at 4:54 pm

@robert did you have any issue installing the twitter module? Do you have a folder named twitter inside: /Library/Python/2.5/site-packages?

#8 robert on 03.11.09 at 5:14 pm

got it now. didn’t realize these had to be done separately:

sudo easyinstall appscript sudo easyinstall twitter

#9 robert on 03.12.09 at 1:58 pm

does Lingon have to be always running for this to work?

#10 robert on 03.12.09 at 2:16 pm

Got it working up to here: ~/Desktop/oftwitter.py. But Lingon doesn’t seem to be working to update every 3 minutes. I notice that this file doesn’t exist: ~/Library/Preferences/com.ptone.oftwitter.plist

#11 warwick on 03.13.09 at 2:31 am

I seem to have an issue with applescript not being installed. When I run the final command in terminal i get ImportError: No module named appscript

#12 will on 10.15.09 at 2:58 pm

I’d really love to try this out but like warwick I don’t seem to have appscript installs. When I run…

sudo easy_install appscript

…appscript 0.2.0 is downloaded but it stops the install process when it can’t find/execute gcc-4.2…

unable to execute gcc-4.2: No such file or directory

..I know you said that we don’t need to worry about not having c-extensions but not having gcc-4.2 appears to be a problem. Am I missing something?

Again, thanks for sharing this. I look forward to trying it out!

#13 Casper TFG on 03.10.10 at 5:53 am

I had screen share with a freelance “tech ninja” employee of mine to get this going. Lingon seems to have been updated so the screen shots here are a tad out of date. I also needed to download a Mac developer kit to get some missing file I needed. (that was a BIG download!) Took us half an hour of tweaking to get rolling. Seems to be working fine now! I am thrilled! Thanks very much.

P.S. (I hope its not difficult to get rolling on Snow Leopard as I am due a laptop upgrade in a few months..)

P.P.S I would say this tweak is a job for a “computer ninja” and perhaps a tad too difficult for the ‘average person’ to install.