> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aigenda.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Результат обработки

> Статус и результат обработки. Опрашивайте раз в 10–15 секунд до classified: true.

## Параметры пути

<ParamField path="space_id" type="integer" required>
  Идентификатор пространства.
</ParamField>

<ParamField path="audio_id" type="integer" required>
  Идентификатор записи.
</ParamField>

## Ответ

<ResponseField name="classified" type="boolean">
  `true`, когда обработка закончена.
</ResponseField>

<ResponseField name="success" type="boolean">
  `true`, если обработка прошла успешно.
</ResponseField>

<ResponseField name="result" type="object | null">
  Протокол, расшифровка и спикеры. `null`, пока обработка идёт.
</ResponseField>

<ResponseField name="result.protocol" type="string">
  Протокол в Markdown.
</ResponseField>

<ResponseField name="result.dialog" type="array">
  Расшифровка по смысловым блокам: `header` и параллельные массивы `starts`, `ends`, `speakers`, `texts`.
</ResponseField>

<ResponseField name="result.speakers_map" type="object">
  Имена спикеров по идентификаторам; метка вида `SPEAKER_01`, если голос не подписан.
</ResponseField>

<ResponseField name="result.speakers_timeline" type="object">
  Интервалы речи по спикерам: `{"{101}": [[0, 13], …]}`.
</ResponseField>

<ResponseField name="result.language" type="string">
  Язык записи.
</ResponseField>

<ResponseField name="audio_id" type="integer">
  Идентификатор записи.
</ResponseField>

<ResponseField name="title" type="string">
  Название записи.
</ResponseField>

<ResponseField name="duration" type="integer">
  Длительность в секундах.
</ResponseField>

<ResponseField name="is_shared" type="boolean">
  Открыт ли публичный доступ.
</ResponseField>

| Ответ | Что значит |
| - | - |
| `404 {"detail": "Not found."}` | Обработку не запускали |
| `200`, `classified: false` | Обработка идёт |
| `200`, `classified: true` | Готово |
| `500` дольше 3 минут | Обработка упала, минуты вернутся |

Подробнее: [Статусы и ожидание](/processing/status) и [Структура результата](/processing/result).

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.aigenda.tech/api/spaces/1024/audio/51234/result/" \
    -H "Authorization: Bearer <access>"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.aigenda.tech/api/spaces/1024/audio/51234/result/",
      headers={"Authorization": "Bearer <access>"},
      timeout=30,
  )
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.aigenda.tech/api/spaces/1024/audio/51234/result/", {
    method: "GET",
    headers: { Authorization: "Bearer <access>" },
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "classified": true,
    "success": true,
    "audio_id": 51234,
    "title": "Планёрка отдела продаж.mp3",
    "duration": 1837,
    "is_shared": false,
    "is_uploaded": true,
    "result": {
      "language": "ru",
      "protocol": "### План продаж на ноябрь\n\nЗапускаем тариф «Старт+» 1 ноября…",
      "dialog": [
        {
          "header": "План продаж на ноябрь",
          "starts": [
            0,
            14
          ],
          "ends": [
            13,
            30
          ],
          "speakers": [
            "{101}",
            "{102}"
          ],
          "texts": [
            "Коллеги, начнём с плана на ноябрь.",
            "Первые заявки ждём на второй неделе."
          ]
        }
      ],
      "speakers_map": {
        "101": "Анна",
        "102": "SPEAKER_01"
      },
      "speakers_timeline": {
        "{101}": [
          [
            0,
            13
          ]
        ],
        "{102}": [
          [
            14,
            30
          ]
        ]
      }
    }
  }
  ```

  ```json 404 theme={null}
  {
    "detail": "Not found."
  }
  ```

  ```html 500 theme={null}
  <!doctype html> … Server Error (500) …
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.