DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Build Chatbots with Dialogflow - Step By Step Guidelines
  • Building an Angular Bot With AWS Lex
  • How to Quickly Build a Progressive Web App Using Lightning Web Components
  • Build Your First Python Chatbot Project

Trending

  • Memory-Optimized Tables: Implementation Strategies for SQL Server
  • Strategies for Securing E-Commerce Applications
  • Designing AI Multi-Agent Systems in Java
  • Data Lake vs. Warehouse vs. Lakehouse vs. Mart: Choosing the Right Architecture for Your Business
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Build and Interact With This Chatbot Through Voice and Audio

Build and Interact With This Chatbot Through Voice and Audio

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.

By 
Vidyasagar (Sarath Chandra) Machupalli FBCS user avatar
Vidyasagar (Sarath Chandra) Machupalli FBCS
DZone Core CORE ·
Apr. 27, 18 · Analysis
Likes (5)
Comment
Save
Tweet
Share
8.5K Views

Join the DZone community and get the full member experience.

Join For Free

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, you can track the app’s usage metrics through the Mobile Analytics service.

Architecture diagram

Objectives

  • Create a chatbot (i.e. create a workspace, define an intent and entity, and 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

  • Download and install Android Studio.

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.

  • Go to the IBM Cloud Catalog and select Watson Assistant service > Lite plan under Watson. Click Create.
  • Click Service credentials on the left pane and click New credential to add a new credential.
  • Click View credentials to see the credentials. Save the credentials in a text editor for quick reference.
  • Navigate to Manage on the left pane and click on Launch tool to see the Watson Assistant dashboard.
  • Click on the Workspaces tab.
  • Click the Import workspace icon and choose the JSON file downloaded above. 
  • Select the Everything option and click Import. A new workspace is created with predefined intents, entities, and dialog flow.
  • On the left pane, click this icon to see all your workspaces:
  • Click this 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 here!

Next Steps

  • Define an intent
  • Define an entity
  • Build the dialog flow
  • Add speech-to-text and text-to-speech capabilities
  • Configure and run the Android app
  • Add Mobile Analytics to track usage

Once you complete all the steps and run the app on an emulator or on an Android device, this is how it looks:

Image title

Chatbot Database Intent (military) Build (game engine) mobile app Workspace

Opinions expressed by DZone contributors are their own.

Related

  • Build Chatbots with Dialogflow - Step By Step Guidelines
  • Building an Angular Bot With AWS Lex
  • How to Quickly Build a Progressive Web App Using Lightning Web Components
  • Build Your First Python Chatbot Project

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!