AudioCodes Intuitive Human Communications for Chatbot Services
Voice.AIGateway
Version 1.8
Notice
Voice.AI Gateway | Integration Guide
Notice
Information contained in this document is believed to be accurate and reliable at the time
of printing. However, due to ongoing product improvements and revisions, AudioCodes
cannot guarantee accuracy of printed material after the Date Published nor can it accept
responsibility for errors or omissions. Updates to this document can be downloaded from
This document is subject to change without notice.
Date Published: August-20-2020
WEEE EU Directive
Pursuant to the WEEE EU Directive, electronic and electrical waste must not be disposed of
with unsorted waste. Please contact your local recycling authority for disposal of this product.
Customer Support
Customer technical support and services are provided by AudioCodes or by an authorized
AudioCodes Service Partner. For more information on how to buy technical support for
AudioCodes products and for contact information, please visit our website at
AudioCodes continually strives to produce high quality documentation. If you have any
comments (suggestions or errors) regarding this document, please fill out the Documentation
Feedback form on our website at https://online.audiocodes.com/documentation-feedback.
Stay in the Loop with AudioCodes
- ii -
Notice
Voice.AI Gateway | Integration Guide
Notes and Warnings
OPEN SOURCE SOFTWARE. Portions of the software may be open source software
and may be governed by and distributed under open source licenses, such as the terms
of the GNU General Public License (GPL), the terms of the Lesser General Public
License(LGPL),BSDandLDAP,whichtermsarelocatedat
https://www.audiocodes.com/services-support/open-source/ and all are incorporated
herein by reference. If any open source software is provided in object code, and its
accompanying license requires that it be provided in source code as well, Buyer may
receive such source code by contacting AudioCodes, by following the instructions
available on AudioCodes website.
Related Documentation
Document Name
Voice.AI Gateway API Reference Guide
Voice.AI Gateway Product Description
Voice.AI Gateway with One-Click Dialogflow Integration Guide
30922"Amazon Lex" and "Google Dialogflow" terms added; AudioCodes API syntax
example for initial sent message; hangupReason updated (CDR); handover
changed to transfer; event type (e.g., string) added; sttEndpointID (description
updated)' miscellaneous.
30923Updated to Ver. 1.4. VOICE_AI_WELCOME event replaced by WELCOME.
30924Dialogflow text length limitation; typo (Product Notice replaced by Product
Description).
30926Updated to Ver. 1.6; Nuance add for STT/TTS; transferSipHeaders (typo);
AudioCodes Voice.AI Gateway enhances chatbot functionality by allowing human
communication with chatbots through voice (voicebot), offering an audio- centric user
experience. Integrating the Voice.AI Gateway into your chatbot environment provides you
with a single-vendor solution, assisting you in migrating your text-based chatbot experience
into a voice-based chatbot.
●Prior to reading this document, it is recommended that you read the Voice.AI
Gateway Product Description to familiarize yourself with AudioCodes Voice.AI
Gateway architecture and solution.
●Most of the information provided in this document is relevant to all bot frameworks.
Where a specific bot framework uses different syntax, a note will indicate this.
Purpose
Voice.AI Gateway | Integration Guide
This guide provides the following:
■ Information that you need to supply AudioCodes for connecting the Voice.AI Gateway to
the third-party cognitive services used in your chatbot environment - bot framework(s),
speech-to-text (STT) engine(s), and text-to-speech (TTS) engine(s).
■ Description of the messages sent by the Voice.AI Gateway to the bot, and messages sent
by the bot to the Voice.AI Gateway to achieve the desired functionality. These descriptions
allow the bot developer to adapt the bot's behavior to the voice and telephony
engagement channels.
Targeted Audience
This guide is intended for IT Administrators and Bot Developers who want to integrate
AudioCodes Voice.AI Gateway into their bot solution.
- 1 -
CHAPTER2 Required Information
2Required Information
This section lists the information that you need to supply AudioCodes for integrating and
connecting the Voice.AI Gateway to the cognitive services of your chatbot environment. This
includes information of the bot framework, Speech-to-Text (STT) provider, and Text-to-Speech
(TTS) provider used in your environment.
Required Information of Bot Framework Provider
To connect the Voice.AI Gateway to bot frameworks, you need to provide AudioCodes with
the bot framework provider's details, as listed in the following table.
Table 2-1: Required Information per Bot Framework
Voice.AI Gateway | Integration Guide
Bot
Framework
Microsoft
Azure
AWS
Required Information
To connect to Microsoft Azure Bot Framework, you need to provide
AudioCodes with the bot's secret key. To obtain this key, refer to Azure's
documentation at https://docs.microsoft.com/en-us/azure/bot-
service/bot-service-channel-connect-directline.
Note: Microsoft Azure Bot Framework Direct Line Version 3.0 must be
used.
To connect to Amazon Lex, you need to provide AudioCodes with the
following:
■ AWS account keys:
✔ Access key
✔ Secret access key
To obtain these keys, refer to the AWS documentation at
account-keys. From the JSON object representing the key, you need to
extract the private key (including the "-----BEGIN PRIVATE KEY-----"
prefix) and the service account email.
■ Client email
■ Project ID (of the bot)
AudioCodes
Bot API
To create the channel between the Voice.AI Gateway's Cognitive Service
component and the bot provider, refer to the document Voice.AI Gateway
API Reference Guide.
Required Information of STT Provider
To connect the Voice.AI Gateway to third-party, speech-to-text (STT) engines, you need to
provide AudioCodes with the STT provider's details, as listed in the following table.
Table 2-2: Required Information per Supported STT Provider
STT
Provider
Microsoft
Azure
Speech
Services
Required Information from STT Provider
ConnectivityLanguage Definition
To connect to Azure's Speech
Service, you need to provide
AudioCodes with your
subscription key for the service.
To connect the Voice.AI Gateway to third-party, text-to-speech (TTS) engines, you need to
provide AudioCodes with the TTS provider's details, as listed in the following table.
Table 2-3: Required Information per Supported TTS Provider
TTS
Provide
r
Micros
oft
ConnectivityLanguage Definition
To connect to Azure's
Speech Service, you need
Required Information from TTS Provider
To connect to Azure Speech Services, you need to
provide AudioCodes with the following:
- 4 -
CHAPTER2 Required Information
TTS
Provide
r
Voice.AI Gateway | Integration Guide
Required Information from TTS Provider
Azure
Speech
Service
s
Google
Cloud
TexttoSpeech
to provide AudioCodes
with your subscription
key for the service.
This section describes the messages that are sent by the Voice.AI Gateway.
Initial Message
When the conversation starts, a message is sent with the details of the call. These details
include (when available) the following:
Table 3-1: Description of Initial Message Sent by Voice.AI Gateway
PropertyTypeDescription
Voice.AI Gateway | Integration Guide
callee
calleeHost
caller
callerHost
callerDisplayNa
me
<Additional
attributes>
StringDialed phone number. This is typically obtained
from the SIP To header.
StringHost part of the destination of the call. This is
typically obtained from the SIP To header.
StringCaller's phone number. This is typically obtained
from the SIP From header.
StringHost part of the source of the call. This is typically
obtained from the SIP From header.
StringCaller's display name. This is typically obtained from
the SIP From header.
-Defines additional attributes such as values from
various SIP headers. These can be added by
customization. The Voice.AI Gateway can be
configured to extract values from the SIP INVITE
message and then send them as additional
attributes in the initial message to the bot.
participants
Array
of
Object
s
Participants of the conversation when the Voice.AI
Gateway is used with the SBC's SIPRec feature (e.g.,
for the Agent Assist solution). This parameter
includes the following sub-parameters:
■ participant: (String) Role of the participant,
which can be one of the following values:
✔ caller
✔ callee
✔ user defined
- 7 -
CHAPTER3 Messages Sent by Voice.AI Gateway
PropertyTypeDescription
Voice.AI Gateway | Integration Guide
The value is obtained from the 'ac:role' element
in the SIPRec XML body. The values should be set
in the SIPRec XML using the SBC's Message
Manipulation functionality, under the <participant> element, as shown in the following
example: