How to build a google voice assistant?

You can’t connect the dots looking forward; you can only connect them looking backward. So you have to trust that the dots will somehow connect in your future – Steve Jobs. I remember once my previous company had an idea to create a text-based assistant, during that time I came to know about the API.AI (former name of the Dialogflow) which help you to do so. After that, my previous company sent a colleague to Singapore to learn more about voice assistant from Google. I remember after he came back they developed very basic voice assistant. Even it was quite basic, but it was quite fascinating to me.  After that incident, once my company needed a new idea to show to a client. So, I gave an idea of voice assistant and made one assistant for them.

Nowadays, Chatbot is very common on many websites including Facebook. The way chatbot response back with the text, similarly, the voice assistant will respond back using the voice.  In the market there are two major players in a voice assistant, first is Google voice assistant and second is Amazon Alexa. In this post, I will talk about Google voice assistant.

Before I dive into Google voice assistant, I would like to introduce certain platforms which we use to build Google voice assistant.

  1. Dialogflow  (formerly Api.ai, Speaktoit): Dialogflow helps us to develop a chatbot including voice and text chatbot.  After developing the chatbot we can integrate with the Facebook, Slack etc. for the text-based chatbot. For voice-based chatbot, we can integrate with the Google voice assistant or Amazon Alexa. You can read more about Dialogflow here.
  2. Google Cloud Function: In layman’s term, the Google cloud function can be used to create an event-driven application. For an example, suppose we want to call a certain code on a particular event then we can use the Google Cloud Function. The below image illustrates how Google Cloud Function works. You can read more here.

 

How Google Cloud Function Works

 

In order to use Dialogflow, we need to know some basics terms of the Dialogflow interface.

Please note, the purpose of this article is to show you the platform and how to use it to create a basic dialogue flow chatbot (which can be integrated for both voice and text). After reading this article you will have your basics clear after which you can go ahead and explore by yourself.

Dialogflow

 

  • Dialogflow: Bot platform
  • Agent: A module within dialogflow which incorporates Natural Language Processing to understand what the user meant and to figure out what “action” has to be carried out. The agent transforms the user request into machine-readable actionable data.
  • Intent: Support or the service that the user wants from the agent. The intent is configured by the developers. Intent determines the action by the code.
  • Fulfillment: This is the code. This part of the conversation lets you pass on the request from your bot to an external source and get a response and pass it back to the user. This is achieved via Webhook. Setting up a webhook allows you to pass information from a matched intent into a web service and get a result from it.

Let’s get started with the Dialogflow.

The first you need to sign up for the Dialogflow, please note you will need a Google Cloud account to create a project. I leave this part for you because it is quite self-explanatory when you get started the sign-up process.

Summary:

  • Chatbots built with Google’s DialogFlow are intelligent personal assistants.
  • Dialogflow abstracts out the Natural Language Processing, Machine Learning, and other deeper concepts and gives a clean usable user interface to focus on the conversation flow and build bots.

In the next chapter, we’ll understand the building blocks of dialogflow and start building our bot.

Please follow and like us:
569

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

www.000webhost.com