AudioCodes Bot API
The following procedure describes how to create a bot connection to your AudioCodes Bot API bot using Live Hub.
The Bot API supports two modes of operation, allowing flexibility depending on your architecture and use case:
-
HTTP mode: Based on HTTP request-response. This mode is suitable for simple, stateless implementations, such as bot connections hosted in AWS Lambda or similar environments.
-
WebSocket mode: Based on a bi-directional WebSocket. This mode is better suited for stateful bot connections and offers additional capabilities, such as:
-
Support for proactive messages from the bot connection
-
Audio streaming support
-
Create a bot connection for HTTP mode bots
Create a bot connection using AudioCodes HTTP-based (text) API. For more details, see HTTP mode API.
To create a bot connection:
-
In the navigation menu pane, select Bot connections, and then click Add new voice bot connection or Add new assist bot connection; the following appears:
If you want to discontinue this step, click Close.
-
Select the AudioCodes Bot API, and then click Next; the following appears:
-
In the 'Bot connection name' field, enter a name for the bot connection.
-
From the 'Bot connection API type' field, choose HTTP API. Selecting this option enables HTTP connection.
-
In the 'Bot connection URL' field, enter the bot URL for creating new conversations as defined in the AudioCodes Bot API.
-
In the 'Token' field, enter the bot access token. For more information on security, see AudioCodes Bot API.
-
From the 'Live Hub region' drop-down, select the geographical location (region) in which Live Hub voice infrastructure is deployed.
-
To validate the Bot URL and Token, click Validate bot connection configuration.
-
From the 'TTS speech service' drop-down list, select the appropriate text-to-speech service.
-
Click Next, the following appears:
-
From the 'STT speech service' drop-down list, select the appropriate text-to-speech service.
-
From the 'Language' drop-down list, select the appropriate language.
-
From the 'Voice name' drop-down list, select the appropriate voice name.
-
Click Create; the new bot connection is created.
Create a bot connection for WebSocket mode bots
Create a bot connection using AudioCodes WebSocket-based (text and voice) API. For more details, see WebSocket mode API
To create a bot connection:
-
In the navigation menu pane, select Bot connections, and then click Add new voice bot connection or Add new assist bot connection; the following appears:
If you want to discontinue this step, click Close.
-
Select the AudioCodes Bot API, and then click Next; the following appears:
-
In the 'Bot connection name' field, enter the name of the bot connection.
-
From the 'Bot connection API type' field, choose WebSocket API. Selecting this option enables WebSocket connection. This option allows both text only, as well as voice streaming, where spoken input is converted to text and then back to voice.
-
In the 'Bot connection URL' field, enter the bot URL for creating new conversations as defined in the AudioCodes Bot API.
-
In the 'Token' field, enter the bot access token. For more information on security, see AudioCodes Bot API.
-
From the 'Live Hub region' drop-down, select the geographical location (region) in which Live Hub voice infrastructure is deployed.
-
To validate the Bot URL and Token, click Validate bot connection configuration.
-
Click Next; the following appears:
-
If you want voice streaming, select Enable voice streaming.
-
In the 'Language' field, either leave the default setting as 'Any' or enter your preferred language for the streaming service.
-
Click Create; the new bot connection is created.