Mobile
Article

Five Simple Ways to Build Artificial Intelligence in 2016

By Patrick Catanzariti

The artificial intelligence and voice recognition space has been growing rapidly. The idea of having a personal assistant you can beckon with the words “Siri”, “Alexa”, “Cortana” or “Ok Google” which connects us to the web and the ever growing Internet of Things (IoT) is becoming ever more commonplace. Even Facebook started getting into the action, releasing its own AI assistant named “M” to a select few within Facebook Messenger. Soon enough, we shall all have artificial intelligence assistants at our disposal!

Luckily for developers who don’t want to wait any longer, there are also a range of services available that make it simple to get started with the basics of building your own artificial intelligence system for whatever purpose you can dream up. Connect up your smart home, control a self made media center, deliver all sorts of information via a personal AI assistant… there are so many options available thanks to APIs and services. This lead up throughout 2015 has made 2016 the year where developers can really get into artificial intelligence and start building solutions of their own.

In this overview, we’ll look at the services that exist which can enable developers to begin connecting their own apps and IoT devices to voice recognition and artificial intelligence throughout 2016.

Wit.ai

Wit.ai

Wit.ai is a service which provides a nice combination of both voice recognition and machine learning for developers. It provides the service to convert verbal commands into text and can also be trained up in how to understand those commands. Early in 2015, they joined Facebook and opened up the entire platform to be free for both public and private instances. Its development has continued since then with new features appearing throughout the year and no sign of things slowing down!

Wit.ai has two main elements to it that you set up within your app – intents and entities. An intent is what action an instruction should take (e.g. turn on a light). An entity is a specific object or piece of information that our AI needs to know about to enact that intent (e.g. which light? Is it a smart light? Should it understand particular colors the light can switch to?). Rather than needing to create intents from scratch, Wit.ai also provides access to existing intents from the developer community which is quite neat!

Wit.ai also has the concept of “roles”, where it can learn to differentiate between entities in different contexts (e.g. numbers in different parts of an instruction can refer to different things – like an age, an order, a count). It also has some entity types built in that it can understand, such as temperature, URLs, emails, duration… etc.

There is a Wit.ai API for developers of iOS, Android, Node.js, Raspberry Pi, Ruby, Python, C, Rust and Windows Phone. It even has a JavaScript plugin for front end developers.

Api.ai

Api.ai

Api.ai is another service which provides similar capabilities to Wit.ai, with intents and entities. Just like Wit.ai, Api.ai is free to use. It also has a paid enterprise option which allows for this to be run on a private cloud internally and more from their services team. This is potentially valuable if your usage needs to be totally private.

One key focus of Api.ai that differs from Wit.ai is its “Domains”. Domains are a whole collection of knowledge and data structures from Api.ai that are ready for use in every Api.ai agent (apps are called “agents” in Api.ai). Domains can include knowledge of common verbs and content types. As an example, it understands the different types of data that a request of “Book restaurant” needs, compared to “Book hotel”. It has a range of real information about encyclopedia-like topics such as history, word definitions, people of significance (e.g. celebrities, writers, characters), movies, stock prices and a lot more.

Api.ai has SDKs for Android, iOS, the Apple Watch, Node.js, Cordova, Unity, C#, Xamarin, Windows Phone, Python and JavaScript. The Unity integration in particular might open this up to a range of additional platforms not listed above! It also can be integrated with Amazon’s Echo and Microsoft’s Cortana.

Jasper

Jasper

If you’d rather do more of the programming side of the AI yourself and you are a fan of Raspberry Pi, you could look into Jasper. Jasper is an open source personal assistant written in Python that runs on the Raspberry Pi Model B.

Jasper provides always-on voice control and some default modules for things like asking for the time, weather, news, Gmail inbox status, Facebook notifications, Spotify controls and more. For the Python developer who wants total control – Jasper might just be for you!

Clarifai

Clarifai

One service from a completely different perspective is Clarifai, an artificial intelligence service that can recognize image and video content. It has its own deep learning engine that continuously improves with every use. If you are keen to take your AI prototype to a whole new level, why not give it the ability to see and recognize objects?

To integrate this into your own applications, Clarifai has both a REST API that could be integrated with your preferred language along with a Python, Java and Node.js API. Their service is free for up to 5000 uses a month.

Fancy Hands

Fancy Hands

M, Facebook Messenger’s AI assistant, works via a mix of both artificial intelligence and a team of human helpers that train the system. These human helpers provide more intelligence to make up for where AI’s current capabilities fall short. You can get access to your own human army of helpers via Fancy Hands. Fancy Hands is a US service which allows customers around the country to request information and services, then as soon as they can, someone at Fancy Hands completes the action.

This can be an exciting option for developers who are focused on the personal assistant angle but need more than current AI alone can provide. Fancy Hands have an API for developers to connect their own app to request Fancy Hand’s services. Maybe your needs are beyond AI’s capabilities or maybe your AI can request Fancy Hand’s help when it needs it?

The Fancy Hands SDK is available for Python, Ruby, Java, PHP, Node.js and Go.

Conclusion

There are a range of services and APIs out there which can provide artificial intelligence and voice recognition. You don’t need to be a computer science expert to implement some of the core basics in your own apps! Try out a few of the above and see what you can create. If you’d prefer more guidance on what is possible, I’ll be putting together some articles here at SitePoint on integrating the above services with the Internet of Things in 2016, keep an eye out for them!

If you do put together your own AI prototype using any of the above services, or you’ve had some experience with the above or a service I did not mention – please share it in the comments or get in touch with me on Twitter (@thatpatrickguy). I’d love to hear about it!

Patrick Catanzariti
Meet the author
PatCat is the founder of Dev Diner, a site helping developers navigate the world of emerging tech. He is a SitePoint editor for the HTML/CSS Channel and a contributing editor for emerging tech such as the Internet of Things, virtual/augmented reality and more. He is an instructor at SitePoint Premium and O'Reilly, a Meta Pioneer and freelance web developer who loves every opportunity to tinker with something new in a tech demo.
  • Manik Lane

    You should have considered adding Melissa (https://github.com/melissa-ai). It is still under R&D by college students, but certainly slowly promise. It’s good for those who want to learn to build a virtual assistant of their own :)

    • Patrick Catanzariti

      Thanks! That is a great addition – mentioned in two comments shows definite promise for Melissa in 2016 :)

    • Carl Vaillancourt

      — Nevermind that comment just remove the parenthesis :p //Did they change their url on github, its a 404 right now? Weird.

      • Patrick Catanzariti

        Strangely both comments above have the closing bracket in their url, remove that at the end and the URL will be a-okay.

        I wonder whether that is pure coincidence or whether they’re the same person twice :/

    • Carl Vaillancourt

      — Nevermind that comment just remove the parenthesis :p //Did they change their url on github, its a 404 right now? Weird.

  • Karan Dey

    Melissa (https://github.com/melissa-ai) should be a good addition to your list!

    • Patrick Catanzariti

      Thanks! It looks like it could have some potential!

  • Patrick Catanzariti

    Thanks for the suggestion, I really like the look of MonkeyLearn :D Thanks for mentioning it. I’d actually love to potentially try it out in a future demo next year for an article.

  • Patrick Catanzariti

    Thanks for the suggestion, I really like the look of MonkeyLearn :D Thanks for mentioning it. I’d actually love to potentially try it out in a future demo next year for an article.

  • Patrick Catanzariti

    Thank you for your input! That’s exactly the sort of comments I wanted to receive, there are a lot of solutions out there, so I’m glad we’re getting some good other options in the comments :)

  • Patrick Catanzariti

    Thank you for your input! That’s exactly the sort of comments I wanted to receive, there are a lot of solutions out there, so I’m glad we’re getting some good other options in the comments :)

  • Patrick Catanzariti

    Thank you for the additional insight, I haven’t heard as much about Sirius. I did come across it in my research but found the other options mentioned above looked easier to implement for beginners (and I was going for simple) ;)

  • Patrick Catanzariti

    Thank you for the additional insight, I haven’t heard as much about Sirius. I did come across it in my research but found the other options mentioned above looked easier to implement for beginners (and I was going for simple) ;)

  • Chris Finiksopoulos

    Great list, i would like to see a post for awesome products that use Artificial Intellgence.
    Thanx anyway

  • M S i N Lund

    I fail to see how anything of this has to do with “Artificial Intelligence”.

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in Mobile, once a week, for free.