Watson

Build a voice-enabled Android Chatbot

Share this post:

This post is an excerpt from our recent solution tutorial with step-by-step instructions showing how easy it is to quickly create a voice-enabled Android-native chatbot with Watson Assistant, Text to Speech, Speech to Text and mobile analytics services on IBM Cloud.

This tutorial walks you through the process of defining intents and entities and building a dialog flow for your chatbot to respond to customer queries. You will learn how to enable Speech to Text and Text to Speech services for easy interaction with the Android app. Also, track the app’s usage metrics through Mobile Analytics service.

Objectives

  • Create a chatbot: create a workspace, define an intent and entity, build the dialog flow
  • Allow end users to interact with chatbot using voice and audio
  • Configure and run the Android app
  • Add Mobile Analytics to track usage

Before you begin

Create a workspace

To begin, you will create Watson Assistant service on IBM® Cloud and add a workspace. A workspace is a container for the artifacts that define the conversation flow.

For this tutorial, you will save and use Ana_workspace.json file with predefined intents, entities and dialog flow to your machine.

  1. Go to the IBM Cloud Catalog and select Watson Assistant service > Lite plan under Watson. Click Create.
  2. Click Service credentials on the left pane and click New credential to add a new credential.
  3. Click View Credentials to see the credentials. Save the credentials in a text editor for quick reference.
  4. Navigate to Manage on the left pane, click on Launch tool to see the Watson Assistant dashboard.
  5. Click on Workspaces tab.
  6. Click Import workspace icon and choose the JSON file downloaded above.
  7. Select Everything option and click Import. A new workspace is created with predefined intents, entities and dialog flow.
  8. On the left pane, click on icon to see all your workspaces. Click icon on the Ana workspace to View details of the workspace. Copy and save the Workspace ID for future reference.

What is an Intent?

An intent represents the purpose of a user’s input, such as answering a question or processing a bill payment. You define an intent for each type of user request you want your application to support. By recognizing the intent expressed in a user’s input, the Watson Assistant service can choose the correct dialog flow for responding to it. In the tool, the name of an intent is always prefixed with the # character.

Simply put, intents are the intentions of the end-user. The following are examples of intent names.

  • #weather_conditions
  • #pay_bill
  • #escalate_to_agent

What is an Entity?

An entity represents a term or object that is relevant to your intents and that provides a specific context for an intent. You list the possible values for each entity and synonyms that users might enter. By recognizing the entities that are mentioned in the user’s input, the Watson Assistant service can choose the specific actions to take to fulfill an intent. In the tool, the name of an entity is always prefixed with the @ character.

The following are examples of entity names

  • @location
  • @menu_item
  • @product

Read the complete tutorial

Next steps

Technical Offering Manager & Polyglot Programmer | IBM Cloud

More Watson stories
October 16, 2018

Watson Office Hours Special Event

Come join IBM specialists to receive 1:1 guidance and have questions answered about how to build with IBM Watson services in this Special Office Hours Event on October 29, 2018, at 1:00pm GMT/3:00pm Eastern European time.

Continue reading

October 8, 2018

Migrating IBM Watson Service Instances from VLAN to VRF

IBM Watson services will automatically change all accounts to support Virtual Routing and Forwarding (VRF), making it easier to connect to private endpoints. The upgrade will occur Saturday, November 10th from 5:30 PM US Eastern to 6:00 PM US Eastern in order to minimize impact to you and your customers’ workloads.

Continue reading

September 30, 2018

IBM Watson AI Services Enabling IAM and Resource Groups

The IBM Watson Group is aligning with the larger IBM Cloud strategy for account organization and access control to service instances. This involves enabling Identity and Access Management (IAM) and Resource Groups in US-South (Dallas) and EU-DE (Frankfurt) data centers.

Continue reading