The Roveb Blog

Simple Mobile Website Loyalty Program for your Business with Roveb

Oct 24, 2011
Home

How to Integrate Siri with your App?

Voice and speech technology is a hot topic these days, thanks to Siri on the iPhone 4S. Just the other day I read a tweet that said:

I’ll marry you Siri if you can do my laundry?

Coming to think of it, most users perceive Siri as a female assistant, due to its voice. Scientific studies have shown that people find a woman’s voice “more pleasing” than that of a man, and hence so many voice-enabled devices sound feminine. But, the question remains — can Siri, touted as the coolest feature of the new iPhone 4S, really do laundry?

I was hoping to demonstrate that Siri is practically capable of doing your dirty laundry, if you really want it to, but to avoid any inclination towards chauvinism, misogyny or disrespect, I’ll just stick to an example around a typical software application.

Apple hasn’t (yet) released an API or SDK for Siri, so we are pretty much on our own. Having said that, we can exploit a workaround (or two).

Let’s assume that my company makes a humble Project Management software, named ProjectTracker. I want my customers to be able to run various types of queries in ProjectTracker using voice-assistance on their mobile device.

One of the queries might be:

What is the current status of the Ford project on ProjectTracker?

Siri won’t know what to do with that. If you ask Siri to use a specific app or website (ProjectTracker in this case) that isn’t supported, it won’t be able to take a relevant action besides a Web search. But, we can make Siri recognize the name of our app and communicate the transcoded query in text form back to us through an SMS or Email for processing and response.

First, we can create a QR code for a phone contact (vCard), which our users can scan to add our app’s contact to their phone, primarily for automated voice-assistance. The contact will basically hold the name of our app (ProjectTracker) and a phone number (through Twilio for SMS processing) or an email address (for incoming message parsing with Mailgun, SendGrid or PostMarkApp).

Now when our users ask Siri, “What is the current status of the Ford project on ProjectTracker?”, Siri will automatically route the query as an SMS or email message to the ProjectTracker contact we provided. So far so good, but what we also need is the ability to parse the message, preform a suitable action and send a response back to the user.

To achieve this, we’ll use a natural language processing and text analysis API (like Alchemy, OpenCalais, Yahoo Term Extraction) for entity tagging, keyword extraction and even sentiment analysis if we want. In the context of our message, this analysis will be able to tell us that “Ford” is a company (entity tagging) and “status” is a matching command (keyword). We can then run a quick database query to find project(s) for a company named “Ford” and retrieve its current status along with other information like allocated resources and estimated date of completion.

Finally, we can respond back to the user with a meaningful reply:

The Ford project is 2 days behind schedule. Mark and Raj are working 80% on it. It’s estimated to be completed next Friday.

Once this message arrives back on the user’s mobile device (as an SMS or email), Siri can even read it back to them.

As an aside, if your app needs to be integrated with the phone calendar, then you can rely on CalDav as shown by the Remember The Milk guys.

Back to the question of laundry, maybe with a little bit of zest and some Ardrino magic you can work wonders with Siri. What do you say?

We are Roveb
Follow us on Twitter