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.

To create a bot connection:

  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. From the 'Speech-to-text service' drop-down list, select the appropriate text-to-speech service.

    • If you selected Microsoft, Google V2, or Google V1,

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

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

      3. From the 'Text-to-speech service' drop-down list, select the appropriate text-to-speech service.

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

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

    • If you selected Deepgram,

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

      2. From the 'Text-to-speech service' drop-down list, select the appropriate text-to-speech service. If you also select Deepgram, from the 'Model' drop-down list, select speech recognition model (for example, Aura-2).

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

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

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

      6. Toggle Voice data privacy. When disabled, you consent to share your data. When enabled, you deny consent to share your data. Enabling this option requires additional payment.

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

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

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

  3. 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:

  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.

    • If you selected Microsoft, Google V2, or Google V1,

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

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

      3. From the 'Text-to-speech service' drop-down list, select the appropriate text-to-speech service.

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

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

    • If you selected Deepgram,

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

      2. From the 'Text-to-speech service' drop-down list, select the appropriate text-to-speech service. If you also select Deepgram, from the 'Model' drop-down list, select speech recognition model (for example, Aura-2).

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

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

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

      6. Toggle Voice data privacy. When disabled, you consent to share your data. When enabled, you deny consent to share your data. Enabling this option requires additional payment.

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

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

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

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