Setting up Watson Assistant for Voice Interaction

Watson™ Assistant for Voice Interaction is a product and set of services that deliver a voice automation system.

Introduction

The services and product included with Watson Assistant for Voice Interaction are:

  • Voice Gateway

  • Watson Assistant

  • Watson Speech services

Prerequisites

You need one or more worker nodes with an IP address that is reachable from the SIP load balancer or your SBC. To increase the number of Voice Gateway pods, you must set the number of replicas in the voicegateway custom resource specification. Only one Voice Gateway pod can be scheduled per node. To balance the load across multiple Voice Gateway pods, you need an external SIP load balancer or an SBC.

The following number of VPCs are required to setup a minimum install of Watson Assistant for Voice Interaction:
Table 1. Number of VPCs required
Component Number of VPCs Capacity
Watson Speech to Text 11 6 concurrent calls
Watson Text to Speech 5 8 concurrent calls
Watson Assistant 7 ~60 concurrent calls (based on 300 request per min)
Voice Gateway (voice only) 2 30-70 concurrent calls (depends on codecs used)
Assuming voice only, you will need a minimum of 25 VPCs for Watson Assistant for Voice Interaction plus the number of VPCs required by IBM Cloud Pak® for Data. This will provide capacity for 11 concurrent calls.

Install Watson services

First, the Cloud Pak for Data control plane must be installed and supported storage must be configured.

Next, you must install the following Watson services:

Set up Watson Assistant for Voice Interaction

Create a dialog skill

After installing the Watson Assistant service, create a dialog skill that defines a script for the conversation with the customer. For more information about how to create a skill, including by importing a JSON file, see Adding a dialog skill.

You can import a sample dialog skill to get started. You can download a sample skill JSON file named sample-conversation-en.json from GitHub.

Set up the tenant configuration

Create a Voice Gateway multitenant configuration file. In the file, you will specify the service instance details and credentials for the Watson services that Voice Gateway needs to be able to access. The name and location that you use for this file are not significant, because you will use the file only to create a secret for the deployment.

You can download a sample tenantConfig.json file from GitHub.

Get bearer tokens for the services

Bearer tokens are used by Voice Gateway to authenticate with each of the Watson services when connections are established. This section explains how to get the bearer tokens for each service instance.

  1. Access the bearer tokens and service URLs from Watson Speech services and Watson Assistant.
    1. From the Cloud Pak for Data web client main menu, click My Instances and select View All.
    2. Find each service instance and click to open it.
    3. The URL and Bearer token are available from the Access information section.
  2. Get the workspace ID for the dialog skills that you plan to use.
    1. Click on your Watson Assistant instance, and then click the Launch tools button.
    2. Click the Skills icon to open the Skills page.
    3. Click the more menu for the skill tile, and then select View API Details.
    4. Copy the skill ID. You will add this ID to the multitenant configuration file as the workspaceID value.
  3. Add the bearer token and URL information for each service to the Voice Gateway multitenant configuration files, for example:
      "conversation": {
         "url": "https://your_cp4d_cluster_host:31843/assistant/wa4vgw/instances/1568728570/api",
         "workspaceID": "a31e0ede-52ce-4089-a153-c5409c86c179",
         "bearerToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwic3ViIjoiYWRtaW4iLCJpc3MiOiJLTk9YU1NPIiwiYXVkIjoiRFNYIiwicm9sZSI6IkFkbWluIiwicGVybWlzc2lvbnMiOltdLCJ1aWQiOiI5OTkiLCJpYXQiOjE1Njg3Mjg1NzN9.DtK7Q_TiV0MBT6mjVTtSoLORr06_i6FFY26I-Sw78NtfcZaX5KcXuOKZBEqNEs9WXSExV_sHdavzT0VD9qKAylE9mh9pRmbMvmLT82-N8Mm4vVxXob0ihxaxiH3qQwO7aOXwyxX8asoePHhOrEugQfC8PNrzAY7mw8J7J3wRvo9z4mh0sQV5GJ0jmfbvOhUMXGjIeKS_flYG9U2U9Ngupql5UYGzoZLpzpIO8c8qyXHFFLTTFzSG4Hm-ZXjBnD4MKLc5qb2pzHoUdhKI0CSWbl0eTrrMVFCm9i2ki-iwQ4KuXAdwDje-0-G6yOeWBWcUxDx829QMLhniB2WiTRJ0Ug",
       },
    
     "tts": {
         "config": {
              "voice": "en-US_AllisonV3Voice"
         },
         "credentials": {
           "url": "https://your_cp4d_cluster_host:31843/text-to-speech/ibm-wc/instances/1568832049/api",
           "bearerToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwic3ViIjoiYWRtaW4iLCJpc3MiOiJLTk9YU1NPIiwiYXVkIjoiRFNYIiwicm9sZSI6IkFkbWluIiwicGVybWlzc2lvbnMiOltdLCJ1aWQiOiI5OTkiLCJpYXQiOjE1Njg5OTc1MTd9.D9Jgr_N9OjLNqcW0-QackOSARM9PW_BjpaYVUFaCEihIcuf4RtrhRBE4fdirf7iGUFmLv893MiUDSZHLG73iypuX-p3a_QTI-ORDC01KPb_ixtKpKfDsXOYzFSzao96XUx1LjXyanVwxnN2NAvSn8Wscwf7joS7uhxLZdm6xTuT5oIhZDADDGPAUuiAUd7kHM2B2-Tb_3HlO6HLdqQh0j2qjBrFGe8PIWFTeBkqmpLBdfo2fmG-Vsx8h0vW2UW5vnm3c2d29E8srGmk5nW9aC14JH8IZnyQciem6aPYtgfZ1EKDo3QJieVMH0qVvkELGYX8MCiqfvnN1UKtb1TR1mQ"
               }
      }
      "stt": {
         "credentials": {
            "url": "https://your_cp4d_cluster_host:31843/speech-to-text/ibm-wc/instances/1568669186/api",
            "bearerToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwic3ViIjoiYWRtaW4iLCJpc3MiOiJLTk9YU1NPIiwiYXVkIjoiRFNYIiwicm9sZSI6IkFkbWluIiwicGVybWlzc2lvbnMiOltdLCJ1aWQiOiI5OTkiLCJpYXQiOjE1Njg2NjkxODl9.W-0fq2Ght7kyTTprou2KI4fSxXGh76DGsAdE7OdAK6aRbWAEzvVLRbkG2f6ySLukxCu0WSUbmwTp6csjdA_Oe4K6ff_Wk35WyXrsXLnJlhePyH-zvnx25CAsT6hlyBp7br3FPY6FceM_T6cxyjE2-VbATPcEBIUavW0IffDj4xUszv4frFBpx7XpOjc_3W2oU5oi1yVBRXdX4q7i4H-Sf5_vfeUdPbV8JkMLhXah20Onituh7EvqTVq9P4DwYnTv1Rn07KLCBhIdiuiYrEHJ6g7O4GUIwR5YOVYTC7dYqDwNDHehudxAFCvRQLSZq7tkSQ2zfMfHHdsPdFeE9AiGEg"
         },
         "config": {
           "model": "en-US_NarrowbandModel"
         }, 
         "broadbandConfig": {
           "model": "en-US_BroadbandModel"
         }
        }
    
Create secrets for the tenant configuration files

To make the Voice Gateway tenant configuration file available to the Voice Gateway pod, you must add it to a secret. Create a secret named vgw-tenantconfig-secret from the configuration file by running the following command:

oc create secret generic vgw-tenantconfig-secret --from-file=tenantConfig=configFileName -n ${PROJECT_CPD_INSTANCE}

In this command, configFileName is the name of the file that you previously created. For example, tenantConfig.json and ${PROJECT_CPD_INSTANCE} is the same project in which you plan to install Voice Gateway.

What to do next

To complete the installation process for Voice Gateway and finish setting up Watson Assistant for Voice Interaction, see Installing Voice Gateway. After Voice Gateway is installed, the Watson Assistant for Voice Interaction solution is ready to use.