Giter Site home page Giter Site logo

watson-voice-agent's Introduction

Nexmo and IBM Voice Agent with Watson

This repo will help you get started with connecting Nexmo to an IBM Voice Agent with Watson service orchestration engine. This will allow you to create complex flows to interact with your customers.

Setting up Node-RED

This sample project uses Node-RED to create the connection between Nexmo and IBM Voice Agent with Watson.

  1. Signup for IBM Cloud account (if you don't already have one)
  2. Create Node-RED Starter app in IBM Cloud (requires upgrade to Premium)
  3. This process can take a few minutes.
  4. Once complete, click View App URL
  5. Follow directions to setup Node-RED
  6. Copy the https://<app name>.mybluemix.net part of the application for use in the next step.

Create Nexmo Voice Application

You will need a Nexmo number and setup the voice application for this app. There are two ways to create an application with Nexmo - using the dashboard or the Nexmo CLI. This section will cover both methods.

Using the Dashboard

  1. Sign in or create a Nexmo account
  2. Buy a new virtual number
  3. Create a voice application
  4. Add the event url - https://<app name>.mybluemix.net/eventURL
  5. Add the answer url - https://<app name>.mybluemix.net/answerURL
  6. Click Create Application
  7. Click Numbers and link the recently created virtual number.
  8. Copy the virtual number for use in the next step.

Using the CLI

  1. Install the CLI by following these instructions.
  2. Buy a virtual number
nexmo number:buy --country_code US
  1. Create the Voice Application
nexmo app:create "VoiceApplication" https://<app name>.mybluemix.net/eventURL https://<app name>.mybluemix.net/eventURL  --keyfile private.key
  1. Link the virtual number to the application
nexmo link:app 15555555555 aaaaaaaa-bbbb-cccc-dddd-0123456789ab

Setting up the Voice Agent

Next you will need to create the Voice Agent in IBM Cloud. Copy the virtual number you created in in Nexmo for this step.

  1. Create an IBM Voice Agent with Watson
  2. Click Manage and then Create a voice agent
  3. Give your agent a name, and paste the Nexmo number in the Phone number field.
  4. Under Watson Assistant:
  5. Copy the workspace ID and store it for the Node-RED setup.
  6. Change the Service type to Service orchestration engine
  7. Add the url https://<app name>.mybluemix.net/soe
  8. Enter your username and password from Node-RED
  9. Click Create voice agent
  10. Navigate to Getting Started and copy your SIP endpoint and add your phone number to it like so: sip:[email protected]

Create Node-RED Flow

Import Flow

There is a sample flow you can import and begin using right away.

  1. Open NodeRED-Nexmo-SOE.json and copy the entire contents.
  2. Open your Node-RED application.
  3. In the top right menu find Import > Clipboard
  4. Paste the json into the window, select New Flow and click Import.

Setup Watson Assistant Node

During the Voice Agent setup, it created a Watson Assistant service. Locate this in your IBM Cloud account.

  1. Copy the API Key and the URL
  2. In Node-RED, locate the Watson Assistant node, and paste in the API Key, paste the URL to Service Endpoint, and the Workspace ID you received during the last step.
  3. Click Done

Setup Nexmo Connect Node

  1. Locate the Connect node, and open it.
  2. Paste your SIP endpoint into the URI field.
  3. Add your virtual number to the From field.

Test it Out

Once all configuration is complete, click the Deploy button in node red to push the flow live.

Dial your virtual phone number. You will hear Please wait while we connect you. followed by the Watson Voice Assistant telling you about Voice Agent.

Extend

To take this further, you will want to build your own Voice Assistant skill set with intents and dialog. You can listen for these with a Node-RED switch and build flows and sub-flows to manage each specific intent.

watson-voice-agent's People

Contributors

alwell-kevin avatar kellyjandrews avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.