This repository contains several componenet deployments to use in for demonstrating real-time voice transcription with AI suggestions to the agent based on conversation between the customer and agent.
The following elements and their file/folder location (parathensis), are part of this demonstration:
- Flex Plugin (src) - Custom UI interface that summarized the Customer data and more.
- Studio Voice Flow (studio) - This is raw JSON for the inbound Studio flow and must be imported into the Flex account.
- Serverless Package (serverless) - This serverless package contains a single Twilio Function that is called by the Flex Plugin
- Real-Time Transcription App - This is a node package that interacts with the Twilio Media Stream, Microsoft Speech Service and Twilio Sync Stream.
The following image hightlight the architecture of this demonstation and the components above.
This screenshot illustrates the agent experience with real-time transcription of the 'customer/agent' conversation. "Agent Assist" capabilites are displayed to the agent as well to aid in solving the customer's inquiry.
The following steps are necessary to use this plugin package. These are:
- Real-time Transcription Engine (apps/transcriptionEngine): Setup/Configure
- Plugin Serverless (apps/serverless) - Setup & Configure
- Import Studio Flow (app/studio)
- Flex Plugin (src) - Setup & Configure
This package is located within 'apps/transcriptionEngine'. Follow the README instructions inclusive to this package.
After setup and configuration, run this app ( node index.js ) to launch the service on port 8080.
This package is located within 'apps/serverless'. Follow the README instructions inclusive to this package.
After setup and configuration, launch the serverless ( twilio serverless:start ) to run locally on port 3000.
This package is located within 'apps/studio'. Within Twilio Studio, create a "New Flow" and import the JSON (copy/paste) from this resource. After your flow is imported, make the following changes:
- Update the StreamInbound widget to include the Ngrok URL from your transcriptionEngine service.
- Update the Workflow setting on the "Send to Flex" widget to "Assign to Anyone".
- Update Task Channel setting on the "Send to Flex Widget" to "Default".
- You can also update the "Attributes" field with customer attributes to suit your demo needs.
- Republish your flow.
The following steps are necessary to configure and test the Flex Plugin found in /src
.
- Configure .env file
cp .env.example .env
- Copy public/appConfig.example.js to appConfig.js, set your Flex accountSid within 'appConfig.js'
cp appConfig.example.js appConfig.js
-
Swich to the
src
directory:cd /src
-
Build the package dependencies.
npm i
-
Install necessary pre-requisites ( Twilio CLI, Flex Plugins CLI & Twilio Serverless Toolkit )
-
From the CLI, Create a Twilio account profile and mark it active
-
Launch the Flex Plugin
While logged into the Twilio Flex account via Twilio Console, launch the Flex Plugin on port 3001.
twilio flex:plugins:start