GithubHelp home page GithubHelp logo

moretemi / voice-gateway-on-icp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/voice-gateway-on-icp

0.0 0.0 0.0 2.35 MB

Use Voice Gateway and Watson on IBM Cloud Private to create a next generation call center

Home Page: https://developer.ibm.com/patterns/create-a-next-generation-call-center-with-voice-gateway/

License: Apache License 2.0

voice-gateway-on-icp's Introduction

Automating Call Centers with Voice Gateway on IBM Cloud Private

This code pattern is a Voice Gateway application that enables companies to automate their call centers using Watson Assistant, Text to Speech, and Speech to Text, without having to orchestrate between all the different services yourself; the Voice Gateway will do that for you.

When the reader has completed this Code Pattern, they will understand how to:

  • Provision Watson Assistant, Speech to Text, and Text to Speech services on IBM Cloud
  • Import a sample Call Center dialog to Watson Assistant
  • Deploy a Voice Gateway service on IBM Cloud Private
  • Connect Voice Gateway to Twilio via the SIP communication protocol

Flow

  1. User phones a call center phone number, associated with a Twilio account.
  2. The Twilio number connects to a configured Voice Gateway service via the SIP communication protocol. Voice Gateway is running on IBM Cloud Private.
  3. Voice Gateway calls Watson Speech to Text to transcribe user input.
  4. Based on user input, certain flows in Watson Assistant will be triggered.
  5. Any results from Watson Assistant will be transmitted back to the Voice Gateway service via Watson Text to Speech.
  6. Voice Gateway will sends the audio back via the Elastic SIP Trunk.
  7. The resulting audio is played back to the user.

Included components

  • IBM Cloud Private: An on-prem version of IBM Cloud to store your sensitive data and applications.
  • IBM Voice Gateway: A service that enables you to build apps that leverage Assistant, Text to Speech, and Speech to Text, without having to tie them all in manually.
  • Watson Assistant: Create a chatbot with a program that conducts a conversation via auditory or textual methods.
  • Watson Text to Speech: Converts written text into natural sounding audio in a variety of languages and voices.
  • Watson Speech to Text: A service that converts human voice into written text.
  • Twilio: Integrate voice, messaging, and VoIP into your web and mobile apps.

Featured Technologies

  • Artificial Intelligence: Artificial intelligence can be applied to disparate solution spaces to deliver disruptive technologies.
  • Python: Python is a programming language that lets you work more quickly and integrate your systems more effectively.

Watch the Video

Prerequisites

Steps

  1. Create Watson services on IBM Cloud
  2. Import the conversation into Watson Assistant
  3. Deploy the Voice Gateway on IBM Cloud Private
  4. Configure Voice Gateway and Twilio

1. Create Watson services on IBM Cloud

Start by heading over to your IBM Cloud catalog and creating the three services listed below:

We'll need the credentials for each of these. To retrieve them, navigate to each created service and select the Credentials tab.

2. Import the conversation into Watson Assistant

Now, setup your chatbot - you can either create your own chatbot, use the sample workspace provided in this code pattern, located in data/workspace.json. Use the Watson Assistant tooling to import the dialog to a new workspace. To do this, launch the Watson Assistant tool and use the import icon button on the right. Find the data/workspace.json file from the cloned repo and import that to the Watson Assistant tool.

Each workspace in Watson Assistant has a specific ID. To find the Workspace ID for a given workspace, click the context menu of the workspace and select View details. The workspace ID can be copied and saved as we'll need it in the next step.

3. Deploy the Voice Gateway on IBM Cloud Private

The interface of IBM Cloud Private is, of course, very similar to that of IBM Cloud (public); so you should find it easy to navigate this interface if you're familiar with IBM Cloud.

Head over to the Catalog, and either search for, or scroll down to, the ibm-voice-gateway-dev tile and select it.

Once the next screen loads choose to Configure your Voice Gateway service.

You can then enter a Release name (the name of your service), a Target namespace (where to store this service), and then read the license agreements. If you agree, check the checkbox.

Finally, you can ignore all of the fields in the following form except for the Watson API Credential fields - go ahead and fill them all out (Assistant, Speech to Text, Text to Speech). Once you fill out these fields, you can click on the Install button.

Once up and running, you should be able to view the running Voice Gateway service. NOTE: Be sure to note the host IP address, we'll be needing that in the next section.

4. Configure Voice Gateway and Twilio

For this next section we'll create a new Twilio account. The Twilio account will provide us with a free phone number for a few days and the ability to configure an SIP trunk to connect with our Voice Gateway. Here's the free phone number that we'll use to configure with an SIP trunk.

To create a new SIP trunk connection go to the context menu and select Elastic SIP Trunking. Create a new one with a unique name.

We now need to let Twilio know about our Voice Gateway service. Set the Origination URI for our new SIP Trunk. The value should look like the line below.

sip:icp_ip_address:voice_gateway_port;transport=tcp

Where icp_ip_address is the ICP IP address and voice_gateway_port the Voice Gateway port. By default the port is 5060.

The last step is to associate our free number with the SIP Trunk. Click on the Numbers sub menu and add the phone number from the beginning of this step.

You're now ready to test things out!

Sample output

Once the Twilio configuration has been completed try calling the phone number. You'll be greeted with the start of your Watson Assistant dialog. Try a few of the questions below to hear back the answers.

  • What are the hours of operation?
  • What's your location?
  • Can I speak to an advisor?
  • I'd like to make an appointment

Links

Learn more

  • Artificial Intelligence Code Patterns: Enjoyed this Code Pattern? Check out our other AI Code Patterns.
  • AI and Data Code Pattern Playlist: Bookmark our playlist with all of our Code Pattern videos
  • With Watson: Want to take your Watson app to the next level? Looking to utilize Watson Brand assets? Join the With Watson program to leverage exclusive brand, marketing, and tech resources to amplify and accelerate your Watson embedded commercial solution.

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

voice-gateway-on-icp's People

Contributors

stevemart avatar stevemar avatar tanmayb123 avatar tqtran7 avatar kant avatar dolph avatar ljbennett62 avatar imgbot[bot] 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.