# AI Voice

The AI Voice Bot allows you to analyze voice messages, interpret Intents, and respond with a fulfillment option.

The Contact Center integration with the Aisera platform for Voice Assistant support is enhanced with updated micro services that orchestrate additional Speech-to-Text (STT) and Text-to-Speech (TTS) vendors. The AI Voice bot supports Voice Activity detection and updates to cleanup sessions on the Aisera platform after call termination.\
\
You can create a bot using the [**AiseraGPT**](https://app.gitbook.com/s/ksUDWGr9UTfOpa53PosP/how-to-set-up-an-aiseragpt-bot) (Webchat bot) or [**Aisera Copilot**](https://app.gitbook.com/s/QbRzfjGifZM4mn1HcRUQ/how-to-setup-aisera-assistant-copilot) (Aisera custom bot) instructions and then ask your Aisera Admin to log into the Database audio codes and create a manual integration.

<figure><img src="https://3033416577-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzxgQkAFm7Gkd9qTdxgat%2Fuploads%2FI8eFrSkWv4qnWdDvWlYo%2Fvoice_end_2_end.png?alt=media&#x26;token=a9de107c-29fa-45d9-9c4a-4e711a83aa05" alt=""><figcaption><p>Routing from Phone Request to Live Agents</p></figcaption></figure>

Currently the process requires someone logging into the (on premise) phone system platform (called 'Contact Center' in the diagrams on this page) to retrieve audio codes and create the necessary components manually for each integration with an **IVR Channel**.&#x20;

## Basic Agent Routing

The bot can perform tasks like call routing to specific agents, but your telephony trunk system probably has this capability.&#x20;

<div align="left"><figure><img src="https://3033416577-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzxgQkAFm7Gkd9qTdxgat%2Fuploads%2FMX8Ry6Vzr5byPSeW5e2G%2Fagent_routing.png?alt=media&#x26;token=b474c830-5548-48e8-ac7e-55e699448016" alt="" width="563"><figcaption><p>Call Routing to Agents</p></figcaption></figure></div>

A voice bot can answer common questions without taking up the agent's time, like how to reset a password.\
\
For instance, you can use the following workflow with a voice bot to reset a password.

The follow diagrams show how you can use a voice bot for **multi-language calls**, **ticket creation**, and **escalation to a live agent**.

## Multi-language Calls

You can use a voice bot to take incoming Requests in multiple languages, find a Fulfillment (answer) and provide the answer in the correct language.

<figure><img src="https://3033416577-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzxgQkAFm7Gkd9qTdxgat%2Fuploads%2F5f9R8wBaTnfZQL4YxXaY%2Fmulti_language.png?alt=media&#x26;token=a080389f-8545-49b8-9214-0075263fd0c2" alt=""><figcaption><p>Multi-Language Call Routing</p></figcaption></figure>

## Ticket Creation

The voice bot can take an incoming call, search for an answer in the data source documents, and then create a ticket if an answer is not found.

<figure><img src="https://3033416577-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzxgQkAFm7Gkd9qTdxgat%2Fuploads%2FVlKl5BMncNBdkghKxYSO%2Fticket_creation.png?alt=media&#x26;token=802ec6e7-ac3e-44d4-9b70-ecabe0631d71" alt=""><figcaption><p>Creating a Ticket When Answer Not Found</p></figcaption></figure>

## Escalation to a Live Agent

You can also escalate a call to a Live Agent using a voice bot.

In this diagram below, a voice bot takes the call, creates a ticket, and then routes the call to a Live Agent.

<figure><img src="https://3033416577-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzxgQkAFm7Gkd9qTdxgat%2Fuploads%2FZ9H8wrPupZuUNljhuPRs%2Fescalation2.png?alt=media&#x26;token=bce6a5c5-457c-44aa-ab0b-e64548cafff1" alt=""><figcaption><p>Escalation to a Live Agent</p></figcaption></figure>

### WebSockets

The AiseraGPT or Copilot bot associated with the IVR Channel opens a WebSocket connection to:&#x20;

`<voice host>/voice-wss/voicebot?tenantId=<tenant>&channelEntityId=<ivrChannelId>&audioFormat=<base64encoded json>`&#x20;

Where:

* (required) `tenantId` → tenant
* (required) `channelEntityId` → IVR channel ID. This will hold all of the Speech to Text
* (optional) `audioFormat` → base64 encoded JSON file that corresponds to the format of the audio that is going to be sent **from the bot client to the server.**

\
Example JSON:

`{`&#x20;

`"encoding": "LINEAR16",`&#x20;

`"sampleRate": 16000,`&#x20;

`"channels": 1`&#x20;

`}`

\
This feature will perform the integrations automatically when you create a new **IVR Channel**.
