# Voice Insights API

## Bước 1: Đăng ký webhook url để nhận kết quả ASR

<mark style="color:green;">`POST`</mark> [`https://public-v1-stg.omicrm.com/api/ai/register_webhook_ai`](https://public-v1-stg.omicrm.com/api/ai/register_webhook_ai)

#### Headers

| Name                                     | Type   | Description                    |
| ---------------------------------------- | ------ | ------------------------------ |
| apiKey<mark style="color:red;">\*</mark> | String | Token xác thực để truy cập API |

#### Request Body

| Name                                  | Type   | Description            |
| ------------------------------------- | ------ | ---------------------- |
| url<mark style="color:red;">\*</mark> | String | Đường dẫn nhận dữ liệu |

{% tabs %}
{% tab title="200: OK Thành công" %}

{% endtab %}
{% endtabs %}

Kết Quả Từ Hook

<div align="center"><figure><img src="/files/FYPbIzlVhdsbrabKBJ4R" alt=""><figcaption></figcaption></figure></div>

| Name                             | Type   | Description                                                                    |
| -------------------------------- | ------ | ------------------------------------------------------------------------------ |
| analyst\_results                 | Object | Tổng hợp các kết quả phân tích                                                 |
| criteria\_classification\_result | Object | Kết quả chấm điểm tự động theo bộ tiêu chí                                     |
| customer\_talk\_time             | Double | Thời gian nói của khách hàng                                                   |
| customer\_word\_alignments       | String | Kết quả chi tiết từng từ của khách hàng từ ASR                                 |
| keyword\_count                   | Object | Danh sách từ khóa tìm được và số lần xuất hiện                                 |
| nl\_analyze\_result              | Object | Kết quả trả về từ mô hình ngôn ngữ lớn (LLM) như GPT                           |
| quality\_evaluation\_result      | Object | Bảng điểm chất lượng tổng hợp cho STAFF và CUSTOMER                            |
| result\_nlp\_analytics           | Object | Kết quả chi tiết từng phân đoạn hội thoại. Tổng hợp thông tin theo một câu nói |
| staff\_talk\_time                | Double | Thời gian nói của nhân viên                                                    |
| staff\_word\_alignments          | Object | Kết quả chi tiết từng từ của nhân viên từ ASR                                  |
| tracking\_id                     | String | ID truyền vào lúc gửi request phân tích qua để Mapping kết quả với request     |

##

## Bước 2: Upload audio, kết quả ASR sẽ được trả về webhook url&#x20;

<mark style="color:green;">`POST`</mark> [`https://public-v1-stg.omicrm.com/api/ai/call_analyze`](https://public-v1-stg.omicrm.com/api/ai/register_webhook_ai)

#### Headers

| Name                                     | Type   | Description                    |
| ---------------------------------------- | ------ | ------------------------------ |
| apiKey<mark style="color:red;">\*</mark> | String | Token xác thực để truy cập API |
| Content-Type                             | String | multipart/form-data;           |

#### Request Body ( Form Data)

| Name                                           | Type   | Description                                                            |
| ---------------------------------------------- | ------ | ---------------------------------------------------------------------- |
| file<mark style="color:red;">\*</mark>         | String | audio file (định dạng hỗ trợ  .wav/ . mp3/.m4a ) muốn chuyển sang text |
| tracking\_id<mark style="color:red;">\*</mark> | String | String chứa ID để khi nhận Webhook client biết kết quả của request nào |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.omicall.com/omicall-api/ai-api/voice-insights-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
