Tuesday, August 24, 2010

Talking to your browser




I stumbled upon a really interesting firefox addon recently called 'Firesay'. The 'Firesay' addon is a first step towards enabling voice commands in the Firefox browser. It has a limited set of voice commands. What worked for me were 'Switch' (to switch to left or right tab), 'Close Tab', 'Multi-task' ( to open a website in the background - worked for me for CNN and Facebook), 'Page Up/Down' and 'Scroll Up/Down'.

I was curious to see if it would work in SeaMonkey too so I tweaked the extension which I downloaded from here http://bit.ly/bv0e2r and tried it in SeaMonkey. Only Scroll and Page Up/Down worked for me in SM and the response was bit slower than on Firefox. Still it seemed like something really exciting to experiment with. What I really want in SM is voice commands to switch between each of the apps in the SM suite. So that for example when I'm browsing the Internet I could simply say 'Chatzilla' and switch to Chatzilla and then say 'Browser' to switch back to the browser or 'Mail' to switch to Mail. Right now I'm planning on using the Firesay addon as a guide towards achieving that.

Firesay pluses

- It doesn't need training. It has a few standard commands built in. This is the concept of Voice Browsing where you have multiple users and a limited vocabulary.

- It works in the presence of noise even. I used the headset microphone for testing with my favorite radio station (http://www.tnlrocks.com/listen_live/player.html) playing in the browser and still it picked up my commands without any mistakes.

Firesay minuses

- It only works in Windows because it utilizes the built in Speech recognition software of Windows.

I'm bit surprised Mozilla hasn't made more progress in Voice Browsing though. Seems Opera is ahead in the game with Opera Voice but unlike Firesay you need to press a button to activate the listening every time you use it. Opera also has gesture recognition for browsing which may be intended to provide easy access to the handicapped. Voice commands seems the more natural way of communicating with a computer to me though. I'll let you be the judge of that http://www.youtube.com/watch?v=kkNxbyp6thM.

Tuesday, August 10, 2010

MailNews Sync 0.3.5 - Sync feed and newsgroup headers in Seamonkey

It's pencils down week in GSoC 2010 and MailNews Sync for Seamonkey has reached version 0.3.5 on AMO.

MailNews Sync 0.3.5

-Setting up MailNews Sync

You can install MailNews Sync 0.3.5 from here. It requires Firefox Sync addon which you can get from here (or you can get the development version I used for testing from here).
MailNews Sync engine has been set to true by default.

-Initial Sync

MailNews sync engine will sync all feed headers on first sync. However for syncing newsgroup headers there is a UI option 'Sync Message Headers' which can be selected from the right click menu of any newsgroup (please see image below). I have included this UI option because newsgroups may contains tens of thousands of messages and having all their headers synced up on initial sync will take a very long time. When sync option is selected for a newsgroup a preference 'mailnews.sync.accounts.fullupload' will be set with the newsgroup's name so that its headers will be synced up at next sync. At the same time another Boolean preference 'mailnews.sync.account.nntp.newsgroup_name' will be set to indicate that sync should be done for that newsgroup.

If sync doesn't run immediately as expected (the sync scheduler runs periodically depending on the amount of items that are in the queue waiting to be synced to the server) you may force sync to run immediately by clicking on the sync icon in the statusbar or by selecting the 'Sync Now' option in 'Tools' ->'Sync' menu.


If stop-script warning is encountered during sync please accept continue for now, until this is fixed in a future version.


-Up sync

Up sync happens in batches of 100 records at a time and can take sometime depending on the number of header records you are going to sync. In sync activity log (about:sync-log) a changed header item is indicated as follows,
Tracker.MailNews     DEBUG Changed item,
ID: 4AF3E769.60505@hfigge.myfqdn.de ,
FLAGGED: true , READ: false , TAG: $label2
This will be upsynced to server depending on whether or not duplicate record is present.


-Down Sync (includes caching)

Down will be indicated by a log record as follows,
Store.MailNews       DEBUG (10468)Down sync of mailnews header,
ID: 9pqdnYvr3Nr2GYLWnZ2dnUVZ_q1i4p2d@mozilla.org ,
URL: mozilla.support.seamonkey , FLAGGED: true , READ: true ,
TAG: [{"tagId":"$label2","tagName":"Work","tagColor":"#FF9900"}]

Store.MailNews DEBUG (10469)Down sync of mailnews header,
ID: 3IadnWFGE7zk_GrXnZ2dnUVZ_vSdnZ2d@mozilla.org ,
URL: mozilla.support.seamonkey , FLAGGED: true , READ: true ,
TAG: [{"tagId":"$label2","tagName":"Work","tagColor":"#FF9900"}]

If the feed of newsgroup of that header record is not available on the other pc, the header record will be cached in a file /weave/mailnews/mailnewsReSync.json. On every SM start-up it the MailNews Sync engine will search for those header feed/newsgroup subscriptions and apply them if available. Caching can be turned off using preference 'mailnews.sync.caching.enabled'

-Syncing Flags, Tags and Read status

MailNews Sync also supports syncing of custom tags and sync multiple tags applied for a message.

I also started work on feed and newsgroup subscription sync but since this was not origianlly planned for the project I will work on it later. There is also the possibility of extending MailNews Sync for syncing email headers. More details about the project can be found here.

Working with Seamonkey community has been really great so far. It's just a great developer community and #seamonkey is definitely one of the most funny and interesting IRC channels on moznet!:D Seamonkey developers work really hard but they really enjoy the work they do and they are very supportive of newcomers. I am especially thankful to KaiRo (Robert Kaiser) and Iav (Igor Velkov) for mentoring this project and also to everyone in the SM developer community who have promptly responded to my queries and helped me correct my coding errors etc. Hope to write another post about my full GSoC experience later on! There is still 5 days left for firm pencils down date and I hope to get some more testing and bug fixing done before that, then i'll be taking a 3 week break for my end semester exams. Afterward I will get back to SM to work on integrating MailNews Sync into comm-central along with the rest of sync code and to try out some C++ work for a change:)