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:

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.

Define bot framework and details

First define bot framework and details. Then configure the speech-to-text and text-to-speech services.

To define the bot framework and details:

  1. 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.

  2. Select the AudioCodes Bot API, and then click Next; the following appears:

  3. In the 'Bot connection name' field, enter a name for the bot connection.

  4. From the 'Bot connection API type' field, choose HTTP API. Selecting this option enables HTTP connection.

  5. In the 'Bot URL' field, enter the bot URL for creating new conversations as defined in the AudioCodes Bot API.

  6. From the 'Live Hub region' drop-down, select the geographical location (region) in which Live Hub voice infrastructure is deployed.

  7. Under 'Authentication', from the 'Authentication method' drop-down list, select Permanent token.

    • If you select No authentication, continue to step 8.

    • If you select Permanant token, in the 'Token' field, enter the bot access token. For more information on security, see AudioCodes Bot API.

    • If you select OAuth2.0, OAuth client credentials flow will be used to obtain an access token that will be sent to your service. Fill in the following fields: 

      • OAuth token URL

      • OAuth client ID

      • OAuth client secret

      • OAuth scopes (optional)

  8. To validate the Bot URL and Token, click Validate bot connection configuration.

  1. Click Next. The Settings screen displays different configuration options depending on which speech services you select.

  2. Proceed to Configure Speech-to-Text service and then Configure Text-to-Speech service.

Configure Speech-to-Text service

Refer to the sections below for instructions on configuring your speech‑to‑text service. When done, continue to Configure Text-to-Speech service.

Microsoft

  1. From the 'Speech-to-text service' drop-down list, select Microsoft.

  2. From the 'Language' drop-down list, select the appropriate language.

Google V1

  1. From the 'Speech-to-text service' drop-down list, select Google V1.

  2. From the 'Language' drop-down list, select the appropriate language.

Google V2

  1. From the 'Speech-to-text service' drop-down list, select Google V2.

  2. From the 'Model' drop-down list, select the speech recognition model (for example, Chirp 2).

  3. From the 'Language' drop-down list, select the appropriate language.

Deepgram

  1. From the 'Speech-to-text service' drop-down list, select Deepgram.

  1. From the 'Model' drop-down list, select the speech recognition model (for example, Nova-3-General).

Custom

  1. From the Text‑to‑speech service drop‑down list, select Custom.

  2. Continue with the steps that apply to the speech provider you configured.

Configure Text-to-Speech service

Refer to the sections below for instructions on configuring your text‑to‑speech service. When done, click Create; the new bot connection is created.

Microsoft

  1. From the 'Text-to-speech service' drop-down list, select Microsoft.

  1. From the 'Voice name' drop-down list, select the appropriate voice name.

  2. Click Create; the new bot connection is created.

Google

  1. From the 'Text-to-speech service' drop-down list, select Google.

    For manual Dialogflow bots, you can select any Speech-to-text and Text-to-speech providers from the drop-down lists including defined speech services.

  2. From the 'Model' drop-down list, select the speech recognition model (for example, Gemini 2.5 Pro).

    Note: If you experience a TTS timeout, consider increasing ttsConnectionTimeoutMS to a value greater than 5000 to improve stability.

  3. From the 'Voice name' drop-down list, select the appropriate voice name.

  4. Click Create; the new bot connection is created.

Amazon

  1. From the 'Text-to-speech service' drop-down list, select Amazon.

  2. From the 'Engine' drop-down list, select the speech recognition engine.

  3. From the 'Voice name' drop-down list, select the appropriate voice name.

  4. Click Create; the new bot connection is created.

Deepgram

  1. From the 'Text-to-speech service' drop-down list, select Deepgram.

    For manual Dialogflow bots, you can select any Speech-to-text and Text-to-speech providers from the drop-down lists including defined speech services.

  1. From the 'Model' drop-down list, select speech recognition model (for example, Aura-2).

  2. Select Multilingual if you need multi-language support. When enabled, a 'Main language' field appears where you can define your main language.

  3. If you didn’t select Multilingual, from the 'Language' drop-down list, select the appropriate language.

  4. From the 'Voice name' drop-down list, select the appropriate voice name.

  5. Toggle Allow Deepgram to use the audio data to improve its models to control whether Deepgram may use your audio data to improve its models. By default, this is enabled. When enabled, Deepgram may use the audio data to support advanced model development in accordance to Deepgram usage terms. Disabling this option will result in higher usage costs.

  6. If you want voice streaming, select Enable voice streaming. Selecting this lets Live Hub stream voice directly between the bot and the user, instead of sending text. If you enable voice streaming, the speech-to-text and text-to-speech drop-down fields will no longer be displayed.

    • Voice streaming quires a real-time LLM model.

    • If you enable voice streaming, the speech-to-text and text-to-speech drop-down fields will no longer be displayed.

  7. Click Create; the new bot connection is created.

Eleven Labs

  1. From the 'Text-to-speech service' drop-down list, select ElevenLabs.

  2. From the 'Model' drop-down list, select speech recognition model.

  3. Select Premade voice or Manual voice ID.

    • If you selected Premade voice, enter the 'Voice name' that is provided by ElevenLabs.

    • If you selected Manual voice ID, choose the 'Voice ID' that you created.

  4. Click Create; the new bot connection is created.

Custom

  1. From the Text‑to‑speech service drop‑down list, select Custom.

  2. Continue with the steps that apply to the speech provider you configured.

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.

Define bot framework and details

First define bot framework and details. Then configure the speech-to-text and text-to-speech services.

To define the bot framework and detail

  1. 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.

  2. Select the AudioCodes Bot API, and then click Next; the following appears:

  3. In the 'Bot connection name' field, enter the name of the bot connection.

  4. 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.

  5. In the 'Bot URL' field, enter the bot URL for creating new conversations as defined in the AudioCodes Bot API.

  6. From the 'Live Hub region' drop-down, select the geographical location (region) in which Live Hub voice infrastructure is deployed.

  7. Under 'Authentication', from the 'Authentication method' drop-down list, select Permanent token.

    • If you select No authentication, continue to step 8.

    • If you select Permanant token, in the 'Token' field, enter the bot access token. For more information on security, see AudioCodes Bot API.

    • If you select OAuth2.0, OAuth client credentials flow will be used to obtain an access token that will be sent to your service. Fill in the following fields: 

      • OAuth token URL

      • OAuth client ID

      • OAuth client secret

      • OAuth scopes (optional)

  8. From the 'Live Hub region' drop-down, select the geographical location (region) in which Live Hub voice infrastructure is deployed.

  9. To validate the Bot URL and Token, click Validate bot connection configuration.

  10. Click Next; the following appears.

  11. If you want voice streaming, select Enable voice streaming. Selecting this lets Live Hub stream voice directly between the bot and the user, instead of sending text.

    1. In the 'Language' field, either leave the default setting as 'Any' or enter your preferred language for the streaming service.

  12. If you do not enable voice steaming, from the 'Speech-to-text service' drop-down list, select the appropriate text-to-speech service.

  13. Proceed to Configure Speech-to-Text service and then Configure Text-to-Speech service.

Configure Speech-to-Text service

Refer to the sections below for instructions on configuring your speech‑to‑text service. When done, continue to Configure Text-to-Speech service.

Microsoft

  1. From the 'Speech-to-text service' drop-down list, select Microsoft.

  2. From the 'Language' drop-down list, select the appropriate language.

Google V1

  1. From the 'Speech-to-text service' drop-down list, select Google V1.

  2. From the 'Language' drop-down list, select the appropriate language.

Google V2

  1. From the 'Speech-to-text service' drop-down list, select Google V2.

  2. From the 'Model' drop-down list, select the speech recognition model (for example, Chirp 2).

  3. From the 'Language' drop-down list, select the appropriate language.

Deepgram

  1. From the 'Speech-to-text service' drop-down list, select Deepgram.

  1. From the 'Model' drop-down list, select the speech recognition model (for example, Nova-3-General).

Custom

  1. From the Text‑to‑speech service drop‑down list, select Custom.

  2. Continue with the steps that apply to the speech provider you configured.

Configure Text-to-Speech service

Refer to the sections below for instructions on configuring your text‑to‑speech service. When done, click Create; the new bot connection is created.

Microsoft

  1. From the 'Text-to-speech service' drop-down list, select Microsoft.

  1. From the 'Voice name' drop-down list, select the appropriate voice name.

  2. Click Create; the new bot connection is created.

Google

  1. From the 'Text-to-speech service' drop-down list, select Google.

    For manual Dialogflow bots, you can select any Speech-to-text and Text-to-speech providers from the drop-down lists including defined speech services.

  2. From the 'Model' drop-down list, select the speech recognition model (for example, Gemini 2.5 Pro).

    Note: If you experience a TTS timeout, consider increasing ttsConnectionTimeoutMS to a value greater than 5000 to improve stability.

  3. From the 'Voice name' drop-down list, select the appropriate voice name.

  4. Click Create; the new bot connection is created.

Amazon

  1. From the 'Text-to-speech service' drop-down list, select Amazon.

  2. From the 'Engine' drop-down list, select the speech recognition engine.

  3. From the 'Voice name' drop-down list, select the appropriate voice name.

  4. Click Create; the new bot connection is created.

Deepgram

  1. From the 'Text-to-speech service' drop-down list, select Deepgram.

    For manual Dialogflow bots, you can select any Speech-to-text and Text-to-speech providers from the drop-down lists including defined speech services.

  1. From the 'Model' drop-down list, select speech recognition model (for example, Aura-2).

  2. Select Multilingual if you need multi-language support. When enabled, a 'Main language' field appears where you can define your main language.

  3. If you didn’t select Multilingual, from the 'Language' drop-down list, select the appropriate language.

  4. From the 'Voice name' drop-down list, select the appropriate voice name.

  5. Toggle Allow Deepgram to use the audio data to improve its models to control whether Deepgram may use your audio data to improve its models. By default, this is enabled. When enabled, Deepgram may use the audio data to support advanced model development in accordance to Deepgram usage terms. Disabling this option will result in higher usage costs.

  6. If you want voice streaming, select Enable voice streaming. Selecting this lets Live Hub stream voice directly between the bot and the user, instead of sending text. If you enable voice streaming, the speech-to-text and text-to-speech drop-down fields will no longer be displayed.

    • Voice streaming quires a real-time LLM model.

    • If you enable voice streaming, the speech-to-text and text-to-speech drop-down fields will no longer be displayed.

  7. Click Create; the new bot connection is created.

Eleven Labs

  1. From the 'Text-to-speech service' drop-down list, select ElevenLabs.

  2. From the 'Model' drop-down list, select speech recognition model.

  3. Select Premade voice or Manual voice ID.

    • If you selected Premade voice, enter the 'Voice name' that is provided by ElevenLabs.

    • If you selected Manual voice ID, choose the 'Voice ID' that you created.

  4. Click Create; the new bot connection is created.

Custom

  1. From the Text‑to‑speech service drop‑down list, select Custom.

  2. Continue with the steps that apply to the speech provider you configured.